Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 "Auto-completion" doesn'r work with QT-libraries
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

oka4
New Member

Russia
2 Posts

Posted - Sep 22 2004 :  11:10:10 AM  Show Profile
Hello, support!

I checked our some problems with VisualAssist once I installed QT (www.trolltech.com) & tried to use auto-completion based QT header files in MSDEV. The problem is incorrect working of auto-completion (it doesn't run at all in VisualAssist this way...)!
QT is the cross-platform developer environment using the special C++ syntax based on slots and signals. Slots and signals are equal to C++ functions but QT implements the special syntax just after key G??publicG?? in header files once they declare slots or signalsG? For example:

public slots:
void animateClick();
void toggle();

signals:
void pressed();
void released();
void clicked();
void toggled( bool );
void stateChanged( int );

Really G??slotsG?? and G??signalsG?? is declared as the following #defines:

#ifdef QT_MOC_CPP
#define slots slots
#define signals signals
#define Q_CLASSINFO( name, value ) Q_CLASSINFO( name, value )
#define Q_PROPERTY( text ) Q_PROPERTY( text )
#define Q_OVERRIDE( text ) Q_OVERRIDE( text )
#define Q_ENUMS( x ) Q_ENUMS( x )
#define Q_SETS( x ) Q_SETS( x )
/* tmake ignore Q_OBJECT */
#define Q_OBJECT Q_OBJECT
/* tmake ignore Q_OBJECT */
#define Q_OBJECT_FAKE Q_OBJECT_FAKE

#else
#define slots //: in class
#define signals protected // in class
#ifndef QT_NO_EMIT
#define emit // emit signal
#endif

so compiler compiles all rightG? but Visual Assist canG??t activate auto-completion correctly! Once I remove key word 'slots' then VisualAssist parses the corresponding file and auto-completing works fine! But the problem persists once I reload MSDEV... I have got the same problem againG?


Regards, Kirill Osipov

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Sep 22 2004 :  4:13:38 PM  Show Profile
i use VAX with .NET 2003 and Qt, since we write our windows product with Qt.

while i have seen the occasional oddity with VAX suggestions and auto completion in my code, over all it works just fine.

this is from a small Qt class:

class ee_win : public QWidget
{
    Q_OBJECT

public:
    ee_win();
    ~ee_win();

protected slots:
    void slot_HexChanged( const QString &stringHex );
    void slot_DecimalChanged( const QString &stringDecimal );
};


VAX quite happily offers me the correct suggestions in the matching cpp file when i type "slot_"

i am currently using Qt 3.3.1 on this machine. can you give some specific examples of where you get a problem?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000