Results 1 to 4 of 4

Thread: QObject::connect: No such slot !?!

  1. #1
    Join Date
    Sep 2008
    Posts
    43
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QObject::connect: No such slot !?!

    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.

    Qt Code:
    1. QPopupMenu *help = new QPopupMenu( this );
    2. help->insertItem( aboutIco, "About", this, SLOT(aboutMenuAction()));
    To copy to clipboard, switch view to plain text mode 

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

    but when i build the project the output says

    Qt Code:
    1. QObject::connect: No such slot SlackpackWidget::aboutMenuAction()
    To copy to clipboard, switch view to plain text mode 

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

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 162 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QObject::connect: No such slot !?!

    have you
    * added Q_OBJECT to the class declaration?
    * is the header listed in the HEADERS section of your .pro file?

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QObject::connect: No such slot !?!

    by the way,,, is QPopupMenu Qt class ??

  4. #4
    Join Date
    Sep 2008
    Posts
    43
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QObject::connect: No such slot !?!

    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?

Similar Threads

  1. Problem When Creating my own Slot
    By Fatla in forum Qt Programming
    Replies: 12
    Last Post: 6th June 2008, 14:44
  2. Replies: 2
    Last Post: 24th March 2008, 16:59
  3. Replies: 6
    Last Post: 21st September 2007, 13:51
  4. QStringList in QObject::connect
    By DPinLV in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2006, 17:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.