How can I do it? Where to place qDebug()?
Printable View
I'm sure you'll find an example here.
In a place that will allow you to see the output and at the same time will guarantee that the return values are the same as the ones used in the if statement.
I reached: Line edit value: "0" But doing that doesn't make sense, my problem is that
doesn't return true (of course I selected this radiobuttons before) and I don't know why. In my code after user selects radiobuttons, all radiobuttons areCode:
if (ui.beaufortBox->isChecked() && ui.knotBox_2->isChecked())
But the real mistery is when user selected two checkboxes (ui.beaufortBox and ui.knotBox_2) and clicked next step button, it sets up labels correctly (which means that this radiobuttons are checked) and after they are set to checkable(false) if clause withCode:
->setCheckable(false)
doesn't return true. RegardsCode:
if (ui.beaufortBox->isChecked() && ui.knotBox_2->isChecked())
Are both buttons checked? Radio buttons are by default mutual exclusive...
Yes, they are both checked, they are in two different groupBoxes. But before setting it to setCheckable(false) the same if clause but in different function returned true!! Strange, isn't it? Regards
I've got it now! I deleted setCheckable(false) and it works. It means, that setCheckable(false) deletes current checked status.
If you change the buttons not to be checkable then no wonder they are not checked... If you want to prevent the user from changing their value, use QWidget::setDisabled() instead.
Marcel told me, that it saves checked() value... However, problem solved;)