Results 1 to 3 of 3

Thread: QMetaObject::connectSlotsByName: No matching signal for

  1. #1
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QMetaObject::connectSlotsByName: No matching signal for

    I'm getting a "QMetaObject::connectSlotsByName: No matching signal for on_radioButton(bool)" error in the debug output of my project when it runs.

    The signals and slots actually work OK, but this message is output.

    I'm using something like this:

    Qt Code:
    1. Window::Window()
    2. {
    3. setupUi(this);
    4.  
    5. connect(xy_radioButton,SIGNAL(clicked(bool)),this,SLOT(on_radioButton(bool)));
    6.  
    7. ....
    8.  
    9. }
    10.  
    11.  
    12. void Window:: on_radioButton(bool checked)
    13. {
    14. ...
    15. }
    To copy to clipboard, switch view to plain text mode 


    In the header I have:

    Qt Code:
    1. private slots:
    2. void on_radioButton(bool);
    To copy to clipboard, switch view to plain text mode 

    Any ideas why this message is output, but it still actually works OK?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMetaObject::connectSlotsByName: No matching signal for

    Slots starting with on_ have special meaning.

    http://doc.trolltech.com/4.3/designe...h-auto-connect

  3. The following user says thank you to jacek for this useful post:

    yaronkle (2nd January 2014)

  4. #3
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMetaObject::connectSlotsByName: No matching signal for

    That was it. Excellent!

    Thanks

Similar Threads

  1. can i connect a signal to a signal
    By amit_pansuria in forum Qt Programming
    Replies: 1
    Last Post: 29th August 2007, 06:28
  2. Replies: 3
    Last Post: 15th April 2007, 19:16
  3. Signal and slots
    By villy in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2007, 10:10
  4. Replies: 2
    Last Post: 17th May 2006, 21:01
  5. no such signal QListBox::currentChanged()
    By jopie bakker in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 15:17

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.