Hello,
I'm connecting a QButtonGroup buttonClicked(int) signal to a slot in my MainWindow class as follows:
QObject::connect( leftButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(onLeftButtonClicked(int)));
The connect works and I get the event. However, when my slot gets the event, id is always -1, no matter which button I press.
The slot looks like:
void MainWindow:nLeftButtonClicked(int id)
{
switch(id)
...
I have 8 buttons in the group. Any idea why I don't get the proper value?
I'm using Qt 4.3.4 on Windows XP SP2.
Thanks,
David
Bookmarks