Reputation: 163
I have 4 radiobutton. Now, I want to group it to 2group.
QRadioButton *radio1 = new QRadioButton(tr("R&adio button 1"));
QRadioButton *radio2 = new QRadioButton(tr("R&adio button 2"));
QRadioButton *radio3 = new QRadioButton(tr("R&adio button 3"));
QRadioButton *radio4 = new QRadioButton(tr("R&adio button 4"));
What will I do . Using QT.Thanks,
Upvotes: 0
Views: 1230
Reputation: 1416
use QButtonGroup http://www.ostools.net/uploads/apidocs/qt/qbuttongroup.html and define each radiobutton with checkid ..
Upvotes: 2
Reputation: 2180
You can use QGroupBox
for grouping multiple radiobuttons
together please try it
Use two differnt QGroupBox
for grouping them into different sets and then you can use this QGroupBox
in the layout
Upvotes: 0