From: Florian J. <flo...@we...> - 2011-05-28 12:04:00
|
Am 28.05.2011 13:54, schrieb WillyFoobar: > > Dear Flo, > > Hello guys, > > > > per principle, you are right. > > in C++, No "scope token" is equal to "scope token" private: > > > I don't know exactly why, > > but the entry Q_OBJECT, that does all the declarations for signals, > slots and all of the other Qt stuff > > relies on the fact, that Q_OBJECT is the first "entry" in a QT-Class. > > > > I had an old Qt Book, where this was documented, > > But I cannot find the reference at teh moment! > > > > Please have a look in > > http://doc.qt.nokia.com/4.7.1/moc.html > > > > At the current Qt Version 4.7, using "private:" before Q_OBJECT might > work well! > > But it cannot be guaranteed for future Qt releases. > > > So we should use Q_OBJECT without the prior "private:" token as stated > below! > > (See line 3 of sample MyClass) > > > Hope this clears the whole stuff! > > > Yours, > > Willy > uh, that was new to me (in fact, i have had no idea about qt before i came to muse ;) ) so, is it correct that Q_OBJECT has to be the first statement after the opening bracket of a class then? greetings flo |