The QGroupBox widget provides a group box frame with a title. More...
#include <qgroupbox.h>
Inherits QFrame.
Inherited by QButtonGroup, QHGroupBox and QVGroupBox.
Type | Name | READ | WRITE | Options |
---|---|---|---|---|
QString | title | title | setTitle | |
Alignment | alignment | alignment | setAlignment | |
Orientation | orientation | orientation | setOrientation | |
int | columns | columns | setColumns |
The intended use of a group box is to show that a number of widgets (i.e. child widgets) are logically related. QPrintDialog is a good example; each of its three panes is one group box.
Qt also provides a more specialized group box, QButtonGroup, that is very useful for organizing buttons in a group.
Constructs a group box widget with no title.
The parent and name arguments are passed to the QWidget constructor.
Constructs a group box with a title.
The parent and name arguments are passed to the QWidget constructor.
Constructs a group box with no title. Child widgets will be arranged in strips rows or columns (depending on orientation).
The parent and name arguments are passed to the QWidget constructor.
Constructs a group box with a title. Child widgets will be arranged in strips rows or columns (depending on orientation).
The parent and name arguments are passed to the QWidget constructor.
Adds an empty cell at the next free position. If size is greater than 0 then the empty cell has a fixed height or width. If the groupbox is oriented horizontally then the empty cell has a fixed height and if oriented vertically it has a fixed width.
Use this method to separate the widgets in the groupbox or to skip the next free cell. For performance reasons call this method after calling setColumnLayout(), setColumns() or setOrientation(). It is in general a good idea to call these methods first (if needed at all) and insert the widgets and spaces afterwards.
Returns the alignment of the group box title.
The default alignment is AlignLeft.
See also: setAlignment() and Qt::AlignmentFlags.
[virtual protected]
Reimplemented to layout new children as they are inserted.
Reimplemented from QObject.
Returns the numbers of columns in the groupbox as passed to the constructor, setColumns() or setColumnLayout().
Returns the current orientation of the groupbox.
See also: setOrientation().
[virtual protected]
Handles paint events for the group box.
Reimplemented from QWidget.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QWidget.
[virtual]
Sets the alignment of the group box title.
The title is always placed on the upper frame line, however, the horizontal alignment can be specified by the alignment parameter.
The alignment is the bitwise OR of the following flags:
AlignLeft
aligns the title text to the left.
AlignRight
aligns the title text to the right.
AlignHCenter
aligns the title text centered.
See also: alignment() and Qt::AlignmentFlags.
[virtual]
Changes the layout of the group box. This function is only useful in combination with the default constructor that does not take any layout information. This function will put all existing children in the new layout. Nevertheless is is not good programming style to call this function after children have been inserted.
See also: setOrientation() and setColumns().
Changes the numbers of columns.Usually it is no good idea to use the method since it is slow. Better set the numbers of columns directly in the constructor.
See also: column() and setColumnLayout().
Changes the orientation of the groupbox. Usually it is no good idea to use the method since it is slow. Better set the orientation directly in the constructor.
See also: orientation().
[virtual]
Sets the group box title text to title, and add a focus-change accelerator if the title contains & followed by an appropriate letter. This produces "User information" with the U underscored and Alt-U moves the keyboard focus into the group.
g->setTitle( "&User information" );
Returns the group box title text.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QWidget.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-2000 Troll Tech, all rights reserved.
Copyright © 2000 Troll Tech | Trademarks | Qt version 2.1.0-beta1
|