[SOLVED] assign button ID
I need to assign some buttons an ID. I created my buttons in QtDesigner and it doesn't seem it is possible with QtDesigner to assign IDs (correct me if i am wrong).
So i am doing this into the code.
I am assigning an ID :
but when i grab this ID the application crashes :
It seems i am doing it wrong
qDebug() << "button pressed : " << ui->inputGroup->button(1) << endl;
This always returns
button pressed : QObject(0x0)
whatever the button is : button(1), button(2), button(3) etc...
Unless it's a typo here, you are assigning IDs to the outputGroup and request the button from the inputGroup
ok. The problem stands between the keyboard and the chair...
Don't worry, it happens to all of us ;)
Happy coding !