PDA

View Full Version : QObject::connect: No such slot !?!



Mystical Groovy
17th September 2008, 16:28
Hey all, Ive created a menuBar for my widget, but i have this strange error with all items on menubar...

heres my code that creates the about item for the menubar.


QPopupMenu *help = new QPopupMenu( this );
help->insertItem( aboutIco, "About", this, SLOT(aboutMenuAction()));


in my .h file ive included under public slots section
"virtual void aboutMenuAction();"

but when i build the project the output says


QObject::connect: No such slot SlackpackWidget::aboutMenuAction()

duh.. this is strange!
can anyone plz help me?

caduel
17th September 2008, 17:17
have you
* added Q_OBJECT to the class declaration?
* is the header listed in the HEADERS section of your .pro file?

aamer4yu
17th September 2008, 17:22
by the way,,, is QPopupMenu Qt class ?? :confused:

Mystical Groovy
18th September 2008, 18:31
guyz you wont believe this, when i compile and run the project with KDevelop i got these error messages.. but when I compile and run the project manually from the console, everythink goes fine, the slots are working ;)

lol?