PDA

View Full Version : QMetaObject::connectSlotsByName: No matching signal for



will49
8th November 2007, 20:09
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:


Window::Window()
{
setupUi(this);

connect(xy_radioButton,SIGNAL(clicked(bool)),this, SLOT(on_radioButton(bool)));

....

}


void Window:: on_radioButton(bool checked)
{
...
}


In the header I have:


private slots:
void on_radioButton(bool);

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

jacek
8th November 2007, 20:15
Slots starting with on_ have special meaning.

http://doc.trolltech.com/4.3/designer-using-a-component.html#widgets-and-dialogs-with-auto-connect

will49
8th November 2007, 20:23
That was it. Excellent!

Thanks