You are not logged in.

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.

1

Wednesday, April 25th 2007, 1:49am

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 ?

tillias

Trainee

Posts: 60

Location: Russian Federation, Voronezh

  • Send private message

2

Wednesday, April 25th 2007, 4:30am

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!

3

Wednesday, April 25th 2007, 5:34pm

QButtonGroup in qt 4 is inherting from QObject.