radio documents within the group. The box will be considered as a group of lower parts. They mutually exclude each other. How can I clear my validation states?
I have several radio data, one of them is checked. How can I “clear” (clear) all radio data? "setChecked" does not work inside the group, I tried to do the following, but could not.
My code is this: radioButtom is inside a groupBox, and I want to disable it. The first setChecked works, but the second does not, the radio bot is not disabled
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
QRadioButton *radioButton;
ui->setupUi(this);
radioButton->setChecked(true);
radioButton->setChecked(false);
}
Where is the problem in my code?
source
share