1QGroupBox(3qt)                                                  QGroupBox(3qt)
2
3
4

NAME

6       QGroupBox - Group box frame with a title
7

SYNOPSIS

9       #include <qgroupbox.h>
10
11       Inherits QFrame.
12
13       Inherited by QButtonGroup, QHGroupBox, and QVGroupBox.
14
15   Public Members
16       QGroupBox ( QWidget * parent = 0, const char * name = 0 )
17       QGroupBox ( const QString & title, QWidget * parent = 0, const char *
18           name = 0 )
19       QGroupBox ( int strips, Orientation orientation, QWidget * parent = 0,
20           const char * name = 0 )
21       QGroupBox ( int strips, Orientation orientation, const QString & title,
22           QWidget * parent = 0, const char * name = 0 )
23       ~QGroupBox ()
24       virtual void setColumnLayout ( int strips, Orientation direction )
25       QString title () const
26       virtual void setTitle ( const QString & )
27       int alignment () const
28       virtual void setAlignment ( int )
29       int columns () const
30       void setColumns ( int )
31       Orientation orientation () const
32       void setOrientation ( Orientation )
33       int insideMargin () const
34       int insideSpacing () const
35       void setInsideMargin ( int m )
36       void setInsideSpacing ( int s )
37       void addSpace ( int size )
38       bool isFlat () const
39       void setFlat ( bool b )
40       bool isCheckable () const
41       void setCheckable ( bool b )
42       bool isChecked () const
43
44   Public Slots
45       void setChecked ( bool b )
46
47   Signals
48       void toggled ( bool on )
49
50   Properties
51       Alignment alignment - the alignment of the group box title
52       bool checkable - whether the group box has a checkbox in its title
53       bool checked - whether the group box's checkbox is checked
54       int columns - the number of columns or rows (depending on
55           QGroupBox::orientation) in the group box
56       bool flat - whether the group box is painted flat or has a frame
57       Orientation orientation - the group box's orientation
58       QString title - the group box title text
59

DESCRIPTION

61       The QGroupBox widget provides a group box frame with a title.
62
63       A group box provides a frame, a title and a keyboard shortcut, and
64       displays various other widgets inside itself. The title is on top, the
65       keyboard shortcut moves keyboard focus to one of the group box's child
66       widgets, and the child widgets are usually laid out horizontally (or
67       vertically) inside the frame.
68
69       The simplest way to use it is to create a group box with the desired
70       number of columns (or rows) and orientation, and then just create
71       widgets with the group box as parent.
72
73       It is also possible to change the orientation() and number of columns()
74       after construction, or to ignore all the automatic layout support and
75       manage the layout yourself. You can add 'empty' spaces to the group box
76       with addSpace().
77
78       QGroupBox also lets you set the title() (normally set in the
79       constructor) and the title's alignment().
80
81       You can change the spacing used by the group box with setInsideMargin()
82       and setInsideSpacing(). To minimize space consumption, you can remove
83       the right, left and bottom edges of the frame with setFlat().
84
85                                   [Image Omitted]
86
87       See also QButtonGroup, Widget Appearance and Style, Layout Management,
88       and Organizers.
89

MEMBER FUNCTION DOCUMENTATION

QGroupBox::QGroupBox ( QWidget * parent = 0, const char * name = 0 )

92       Constructs a group box widget with no title.
93
94       The parent and name arguments are passed to the QWidget constructor.
95
96       This constructor does not do automatic layout.
97

QGroupBox::QGroupBox ( const QString & title, QWidget * parent = 0, const char

99       * name = 0 )
100       Constructs a group box with the title title.
101
102       The parent and name arguments are passed to the QWidget constructor.
103
104       This constructor does not do automatic layout.
105

QGroupBox::QGroupBox ( int strips, Orientation orientation, QWidget * parent =

107       0, const char * name = 0 )
108       Constructs a group box with no title. Child widgets will be arranged in
109       strips rows or columns (depending on orientation).
110
111       The parent and name arguments are passed to the QWidget constructor.
112

QGroupBox::QGroupBox ( int strips, Orientation orientation, const QString &

114       title, QWidget * parent = 0, const char * name = 0 )
115       Constructs a group box titled title. Child widgets will be arranged in
116       strips rows or columns (depending on orientation).
117
118       The parent and name arguments are passed to the QWidget constructor.
119

QGroupBox::~QGroupBox ()

121       Destroys the group box.
122

void QGroupBox::addSpace ( int size )

124       Adds an empty cell at the next free position. If size is greater than
125       0, the empty cell takes size to be its fixed width (if orientation() is
126       Horizontal) or height (if orientation() is Vertical).
127
128       Use this method to separate the widgets in the group box or to skip the
129       next free cell. For performance reasons, call this method after calling
130       setColumnLayout() or by changing the QGroupBox::columns or
131       QGroupBox::orientation properties. It is generally a good idea to call
132       these methods first (if needed at all), and insert the widgets and
133       spaces afterwards.
134

int QGroupBox::alignment () const

136       Returns the alignment of the group box title. See the "alignment"
137       property for details.
138

int QGroupBox::columns () const

140       Returns the number of columns or rows (depending on
141       QGroupBox::orientation) in the group box. See the "columns" property
142       for details.
143

int QGroupBox::insideMargin () const

145       Returns the width of the empty space between the items in the group and
146       the frame of the group.
147
148       Only applies if the group box has a defined orientation.
149
150       The default is usually 11, by may vary depending on the platform and
151       style.
152
153       See also setInsideMargin() and orientation.
154

int QGroupBox::insideSpacing () const

156       Returns the width of the empty space between each of the items in the
157       group.
158
159       Only applies if the group box has a defined orientation.
160
161       The default is usually 5, by may vary depending on the platform and
162       style.
163
164       See also setInsideSpacing() and orientation.
165

bool QGroupBox::isCheckable () const

167       Returns TRUE if the group box has a checkbox in its title; otherwise
168       returns FALSE. See the "checkable" property for details.
169

bool QGroupBox::isChecked () const

171       Returns TRUE if the group box's checkbox is checked; otherwise returns
172       FALSE. See the "checked" property for details.
173

bool QGroupBox::isFlat () const

175       Returns TRUE if the group box is painted flat or has a frame; otherwise
176       returns FALSE. See the "flat" property for details.
177

Orientation QGroupBox::orientation () const

179       Returns the group box's orientation. See the "orientation" property for
180       details.
181

void QGroupBox::setAlignment ( int ) [virtual]

183       Sets the alignment of the group box title. See the "alignment" property
184       for details.
185

void QGroupBox::setCheckable ( bool b )

187       Sets whether the group box has a checkbox in its title to b. See the
188       "checkable" property for details.
189

void QGroupBox::setChecked ( bool b ) [slot]

191       Sets whether the group box's checkbox is checked to b. See the
192       "checked" property for details.
193

void QGroupBox::setColumnLayout ( int strips, Orientation direction )

195       [virtual]
196       Changes the layout of the group box. This function is only useful in
197       combination with the default constructor that does not take any layout
198       information. This function will put all existing children in the new
199       layout. It is not good Qt programming style to call this function after
200       children have been inserted. Sets the number of columns or rows to be
201       strips, depending on direction.
202
203       See also orientation and columns.
204
205       Example: chart/optionsform.cpp.
206

void QGroupBox::setColumns ( int )

208       Sets the number of columns or rows (depending on
209       QGroupBox::orientation) in the group box. See the "columns" property
210       for details.
211

void QGroupBox::setFlat ( bool b )

213       Sets whether the group box is painted flat or has a frame to b. See the
214       "flat" property for details.
215

void QGroupBox::setInsideMargin ( int m )

217       Sets the the width of the inside margin to m pixels.
218
219       See also insideMargin().
220

void QGroupBox::setInsideSpacing ( int s )

222       Sets the width of the empty space between each of the items in the
223       group to s pixels.
224
225       See also insideSpacing().
226

void QGroupBox::setOrientation ( Orientation )

228       Sets the group box's orientation. See the "orientation" property for
229       details.
230

void QGroupBox::setTitle ( const QString & ) [virtual]

232       Sets the group box title text. See the "title" property for details.
233

QString QGroupBox::title () const

235       Returns the group box title text. See the "title" property for details.
236

void QGroupBox::toggled ( bool on ) [signal]

238       If the group box has a check box (see isCheckable()) this signal is
239       emitted when the check box is toggled. on is TRUE if the check box is
240       checked; otherwise it is FALSE.
241
242   Property Documentation

Alignment alignment

244       This property holds the alignment of the group box title.
245
246       The title is always placed on the upper frame line. The horizontal
247       alignment can be specified by the alignment parameter.
248
249       The alignment is one of the following flags:
250
251       AlignAuto aligns the title according to the language, usually to the
252       left.
253
254       AlignLeft aligns the title text to the left.
255
256       AlignRight aligns the title text to the right.
257
258       AlignHCenter aligns the title text centered.
259
260       The default alignment is AlignAuto.
261
262       See also Qt::AlignmentFlags.
263
264       Set this property's value with setAlignment() and get this property's
265       value with alignment().
266

bool checkable

268       This property holds whether the group box has a checkbox in its title.
269
270       If this property is TRUE, the group box has a checkbox. If the checkbox
271       is checked (which is the default), the group box's children are
272       enabled.
273
274       setCheckable() controls whether or not the group box has a checkbox,
275       and isCheckable() controls whether the checkbox is checked or not.
276
277       Set this property's value with setCheckable() and get this property's
278       value with isCheckable().
279

bool checked

281       This property holds whether the group box's checkbox is checked.
282
283       If the group box has a check box (see isCheckable()), and the check box
284       is checked (see isChecked()), the group box's children are enabled. If
285       the checkbox is unchecked the children are disabled.
286
287       Set this property's value with setChecked() and get this property's
288       value with isChecked().
289

int columns

291       This property holds the number of columns or rows (depending on
292       QGroupBox::orientation) in the group box.
293
294       Usually it is not a good idea to set this property because it is slow
295       (it does a complete layout). It is best to set the number of columns
296       directly in the constructor.
297
298       Set this property's value with setColumns() and get this property's
299       value with columns().
300

bool flat

302       This property holds whether the group box is painted flat or has a
303       frame.
304
305       By default a group box has a surrounding frame, with the title being
306       placed on the upper frame line. In flat mode the right, left and bottom
307       frame lines are omitted, and only the thin line at the top is drawn.
308
309       See also title.
310
311       Set this property's value with setFlat() and get this property's value
312       with isFlat().
313

Orientation orientation

315       This property holds the group box's orientation.
316
317       A horizontal group box arranges it's children in columns, while a
318       vertical group box arranges them in rows.
319
320       Usually it is not a good idea to set this property because it is slow
321       (it does a complete layout). It is better to set the orientation
322       directly in the constructor.
323
324       Set this property's value with setOrientation() and get this property's
325       value with orientation().
326

QString title

328       This property holds the group box title text.
329
330       The group box title text will have a focus-change keyboard accelerator
331       if the title contains &, followed by a letter.
332
333               g->setTitle( "&User information" );
334       This produces "<u>U</u>ser information"; Alt+U moves the keyboard focus
335       to the group box.
336
337       There is no default title text.
338
339       Set this property's value with setTitle() and get this property's value
340       with title().
341
342

SEE ALSO

344       http://doc.trolltech.com/qgroupbox.html
345       http://www.trolltech.com/faq/tech.html
346
348       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
349       license file included in the distribution for a complete license
350       statement.
351

AUTHOR

353       Generated automatically from the source code.
354

BUGS

356       If you find a bug in Qt, please report it as described in
357       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
358       help you. Thank you.
359
360       The definitive Qt documentation is provided in HTML format; it is
361       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
362       web browser. This man page is provided as a convenience for those users
363       who prefer man pages, although this format is not officially supported
364       by Trolltech.
365
366       If you find errors in this manual page, please report them to qt-
367       bugs@trolltech.com.  Please include the name of the manual page
368       (qgroupbox.3qt) and the Qt version (3.3.8).
369
370
371
372Trolltech AS                    2 February 2007                 QGroupBox(3qt)
Impressum