how to use QGroupBox in place of QButtonGroup

3.7k Views Asked by At

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?

1

There are 1 best solutions below

1
On

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.