GroupBox QML Type
|Import Statement:||import QtQuick.Controls 1.4|
A group box provides a frame, a title on top and displays various other controls inside itself. Group boxes can also be checkable.
Child controls in checkable group boxes are enabled or disabled depending on whether or not the group box is checked.
You can minimize the space consumption of a group box by enabling the flat property. In most styles, enabling this property results in the removal of the left, right and bottom edges of the frame.
To add content to a group box, you can reparent it to its contentItem property.
The implicit size of the GroupBox is calculated based on the size of its content. If you want to anchor items inside the group box, you must specify an explicit width and height on the GroupBox itself.
The following example shows how we use a GroupBox:
This property holds whether the group box has a checkbox in its title.
If this property is true, the group box displays its title using a checkbox in place of an ordinary label. If the checkbox is checked, the group box's children are enabled; otherwise, they are disabled and inaccessible.
By default, group boxes are not checkable.
This property holds whether the group box is checked.
If the group box is checkable, it is displayed with a check box. If the check box is checked, the group box's children are enabled; otherwise, the children are disabled and are inaccessible to the user.
By default, checkable group boxes are also checked.
[read-only] contentItem : Item
This property holds the content Item of the group box.
Note: The implicit size of the GroupBox is calculated based on the size of its content. If you want to anchor items inside the group box, you must specify an explicit width and height on the GroupBox itself.
This property holds whether the group box is painted flat or has a frame.
A group box usually consists of a surrounding frame with a title at the top. If this property is enabled, only the top part of the frame is drawn in most styles; otherwise, the whole frame is drawn.
By default, this property is disabled, so group boxes are not flat unless explicitly specified.
Note: In some styles, flat and non-flat group boxes have similar representations and may not be as distinguishable as they are in other styles.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.