QGroupBox Class Reference |
The QGroupBox widget provides a group box frame with a title.
A group box provides a frame, a title and a keyboard shortcut, and displays various other widgets inside itself. The title is on top, the keyboard shortcut moves keyboard focus to one of the group box's child widgets.
QGroupBox also lets you set the title (normally set in the constructor) and the title's alignment(). If setCheckable(true) is called then the group box is isCheckable(), and it can be setChecked(). Checkable group boxes child widgets are enabled or disabled depending on whether or not the group box is isChecked().
To minimize space consumption, you can remove the right, left and bottom edges of the frame with setFlat().
See also QButtonGroup.
This property holds the alignment of the group box title.
The title is always placed on the upper frame line. The horizontal alignment can be specified by the alignment parameter.
The alignment is one of the following flags:
The default alignment is Qt::AlignLeft.
Access functions:
See also Qt::Alignment.
This property holds whether the group box has a checkbox in its title.
If this property is true, the group box has a checkbox. If the checkbox is checked (which is the default), the group box's children are enabled.
setCheckable() controls whether or not the group box has a checkbox, and isCheckable() controls whether the checkbox is checked or not.
Access functions:
This property holds whether the group box's checkbox is checked.
If the group box has a check box (see isCheckable()), and the check box is checked, the group box's children are enabled. If the checkbox is unchecked the children are disabled.
Access functions:
This property holds whether the group box is painted flat or has a frame.
By default a group box has a surrounding frame, with the title being placed on the upper frame line. In flat mode the right, left and bottom frame lines are omitted, and only the thin line at the top is drawn.
Access functions:
See also title.
This property holds the group box title text.
The group box title text will have a focus-change keyboard shortcut if the title contains &, followed by a letter.
g->setTitle("&User information");
This produces "User information"; Alt+U moves the keyboard focus to the group box.
There is no default title text.
Access functions:
Constructs a group box widget with no title and parent parent.
Constructs a group box with the title title and parent parent.
Destroys the group box.
If the group box has a check box (see isCheckable()) this signal is emitted when the check box is toggled. on is true if the check box is checked; otherwise it is false.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.0 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com