Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
QGroupBox
n QT3 there was a function find(int id) that returns the button with the specified identifier id, or 0 if the button was not found. This function is not available in Qt4 and if you want to use QGroupbox instead of Qt 3 QbuttonGroup What will be equivalent function to return pointer to QAbstractButton ?
I suppose you should use
QButtonGroup class ( which Inherits QGroupBox )
http://doc.trolltech.com/4.2/qbuttongroup.html
|
Source code
|
1
|
void addButton ( QAbstractButton * button, int id )
|
To get list of buttons use it's buttons() member:
|
Source code
|
1
|
QList<QAbstractButton *> buttons () const
|
God bless you!
QButtonGroup in qt 4 is inherting from QObject.