RiverWare Qt4 Port Completion >>
RiverWare / Qt3 Compatibility Widget Porting Guide
RiverWare / Porting Q3ButtonGroup to Qt4 QGroupBox/QButtonGroup
January 20, 2010 -- Phil
|
The Qt3 QButtonGroup (now Q3ButtonGroup) had been both an actual QWidget parent container AND a functional controller (in particular, for mutual exclusion of buttons, e.g. radio buttons).
In Qt4, QButtonGroup is no longer a QWidget. It is only a QObject, and has only the latter function (mutual exclusion controller). So the child widgets of the Q3ButtonGroup should instead be parented by a QGroupBox. And if the necessary mutual exclusion function is required only for QRadioButtons, they are automatically mutual exclusive just by having a common parent. In that case, inserting the QRadioButtons into a QButtonGroup (for mutual exclusion) is not necessary. In fact, only buttons (QAbstractButton subclasses) can be added to a QButtonGroup.
Here are some images of the Q3ButtonGroups in the Simulation Diagnostics Configuration dialog.
---