Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use QGroupBox in place of QButtonGroup

I'm trying to figure out how to use the QGroupBox widget in place of the QButtonGroup widget as the qt docs (link below) 'strongly advise against using it'.

https://doc.qt.io/archives/qt-4.7/q3buttongroup.html

The QButtonGroup had a handy method called QtGui.QButtonGroup.checkedButton() and I'm looking for a way to find the checked radio button contained in the QGroupBox. What is the new best practice for this?

like image 380
jonathan topf Avatar asked Aug 19 '12 19:08

jonathan topf


1 Answers

The QButtonGroup Still exists and is in use only its implementation has changed and is no longer a Widget. In qt designer the QButtonGroup is no longer in the widget menu, you now select the buttons you wish to associate with a group and right click to add a QButtonGroup.

like image 123
jonathan topf Avatar answered Sep 20 '22 23:09

jonathan topf