⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qgroupbox.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QGroupBox 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQGroupBox \- Group box frame with a title.SH SYNOPSIS\fC#include <qgroupbox.h>\fR.PPInherits QFrame..PPInherited by QButtonGroup, QHGroupBox, and QVGroupBox..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQGroupBox\fR ( QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fBQGroupBox\fR ( const QString & title, QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fBQGroupBox\fR ( int strips, Orientation orientation, QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fBQGroupBox\fR ( int strips, Orientation orientation, const QString & title, QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "virtual void \fBsetColumnLayout\fR ( int strips, Orientation direction )".br.ti -1c.BI "QString \fBtitle\fR () const".br.ti -1c.BI "virtual void \fBsetTitle\fR ( const QString & )".br.ti -1c.BI "int \fBalignment\fR () const".br.ti -1c.BI "virtual void \fBsetAlignment\fR ( int )".br.ti -1c.BI "int \fBcolumns\fR () const".br.ti -1c.BI "void \fBsetColumns\fR ( int )".br.ti -1c.BI "Orientation \fBorientation\fR () const".br.ti -1c.BI "void \fBsetOrientation\fR ( Orientation )".br.ti -1c.BI "int \fBinsideMargin\fR () const".br.ti -1c.BI "int \fBinsideSpacing\fR () const".br.ti -1c.BI "void \fBsetInsideMargin\fR ( int m )".br.ti -1c.BI "void \fBsetInsideSpacing\fR ( int s )".br.ti -1c.BI "void \fBaddSpace\fR ( int size )".br.ti -1c.BI "bool \fBisFlat\fR () const".br.ti -1c.BI "void \fBsetFlat\fR ( bool b )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "Alignment \fBalignment\fR - the alignment of the group box title".br.ti -1c.BI "int \fBcolumns\fR - the number of columns or rows (depending on \\l QGroupBox::orientation) in the group box".br.ti -1c.BI "bool \fBflat\fR - whether the group box is painted flat or has a frame around it".br.ti -1c.BI "Orientation \fBorientation\fR - the current orientation of the group box".br.ti -1c.BI "QString \fBtitle\fR - the group box title text".br.in -1c.SH DESCRIPTIONThe QGroupBox widget provides a group box frame with a title..PPA 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, and the child widgets are arranged in an array inside the frame..PPThe simplest way to use it is to create a group box with the desired number of columns (or rows) and orientation, and then just create widgets with the group box as parent..PPHowever, it is also possible to change the orientation() and number of columns() after construction, or to ignore all the automatic layout support and manage all that yourself. You can add 'empty' spaces to the group box with addSpace()..PPQGroupBox also lets you set the title() (normally set in the constructor) and the title's alignment()..PPYou can change the spacing used by the group box with setInsideMargin() and setInsideSpacing(). To reduce space consumption, you can remove the right, left and bottom edges of the frame with setFlat()..PP.ce 1.B "[Image Omitted]".PPSee also QButtonGroup, Widget Appearance and Style, Layout Management, and Organizers..SH MEMBER FUNCTION DOCUMENTATION.SH "QGroupBox::QGroupBox ( QWidget * parent = 0, const char * name = 0 )"Constructs a group box widget with no title..PPThe \fIparent\fR and \fIname\fR arguments are passed to the QWidget constructor..PPThis constructor does not do automatic layout..SH "QGroupBox::QGroupBox ( const QString & title, QWidget * parent = 0, const char * name = 0 )"Constructs a group box with the title \fItitle\fR..PPThe \fIparent\fR and \fIname\fR arguments are passed to the QWidget constructor..PPThis constructor does not do automatic layout..SH "QGroupBox::QGroupBox ( int strips, Orientation orientation, QWidget * parent = 0, const char * name = 0 )"Constructs a group box with no title. Child widgets will be arranged in \fIstrips\fR rows or columns (depending on \fIorientation\fR)..PPThe \fIparent\fR and \fIname\fR arguments are passed to the QWidget constructor..SH "QGroupBox::QGroupBox ( int strips, Orientation orientation, const QString & title, QWidget * parent = 0, const char * name = 0 )"Constructs a group box titled \fItitle\fR. Child widgets will be arranged in \fIstrips\fR rows or columns (depending on \fIorientation\fR)..PPThe \fIparent\fR and \fIname\fR arguments are passed to the QWidget constructor..SH "void QGroupBox::addSpace ( int size )"Adds an empty cell at the next free position. If \fIsize\fR is greater than 0, the empty cell has a fixed height or width. If the group box is oriented horizontally, the empty cell has a fixed height; if oriented vertically, it has a fixed width..PPUse this method to separate the widgets in the group box or to skip the next free cell. For performance reasons, call this method after calling setColumnLayout() or by changing the QGroupBox::columns or QGroupBox::orientation properties. It is generally a good idea to call these methods first (if needed at all), and insert the widgets and spaces afterwards..SH "int QGroupBox::alignment () const"Returns the alignment of the group box title. See the "alignment" property for details..SH "int QGroupBox::columns () const"Returns the number of columns or rows (depending on QGroupBox::orientation) in the group box. See the "columns" property for details..SH "int QGroupBox::insideMargin () const"Returns the width of the blank spacing between the items in the group and the frame of the group..PPOnly applies if the group box has a defined orientation..PPThe default is about 11..PPSee also setInsideMargin() and orientation..SH "int QGroupBox::insideSpacing () const"Returns the width of the blank spacing between each of the items in the group..PPOnly applies if the group box has a defined orientation..PPThe default is about 5..PPSee also setInsideSpacing() and orientation..SH "bool QGroupBox::isFlat () const"Returns TRUE if the group box is painted flat or has a frame around it; otherwise returns FALSE. See the "flat" property for details..SH "Orientation QGroupBox::orientation () const"Returns the current orientation of the group box. See the "orientation" property for details..SH "void QGroupBox::setAlignment ( int )\fC [virtual]\fR"Sets the alignment of the group box title. See the "alignment" property for details..SH "void QGroupBox::setColumnLayout ( int strips, Orientation direction )\fC [virtual]\fR"Changes the layout of the group box. This function is useful only in combination with the default constructor that does not take any layout information. This function will put all existing children in the new layout. It is not good Qt programming style to call this function after children have been inserted. Sets the number of columns or rows to be \fIstrips\fR, depending on \fIdirection\fR..PPSee also orientation and columns..PPExample: chart/optionsform.cpp..SH "void QGroupBox::setColumns ( int )"Sets the number of columns or rows (depending on QGroupBox::orientation) in the group box. See the "columns" property for details..SH "void QGroupBox::setFlat ( bool b )"Sets whether the group box is painted flat or has a frame around it to \fIb\fR. See the "flat" property for details..SH "void QGroupBox::setInsideMargin ( int m )"Sets the the width of the blank spacing between each of the items in the group to \fIm\fR pixels..PPSee also insideSpacing()..SH "void QGroupBox::setInsideSpacing ( int s )"Sets the width of the blank spacing between each of the items in the group to \fIs\fR pixels..SH "void QGroupBox::setOrientation ( Orientation )"Sets the current orientation of the group box. See the "orientation" property for details..SH "void QGroupBox::setTitle ( const QString & )\fC [virtual]\fR"Sets the group box title text. See the "title" property for details..SH "QString QGroupBox::title () const"Returns the group box title text. See the "title" property for details..SS "Property Documentation".SH "Alignment alignment"This property holds the alignment of the group box title..PPThe title is always placed on the upper frame line; however, the horizontal alignment can be specified by the alignment parameter..PPThe alignment is one of the following flags:.TPAlignAuto aligns the title accroding to the language, usually left..TPAlignLeft aligns the title text to the left..TPAlignRight aligns the title text to the right..TPAlignHCenter aligns the title text centered..PPThe default alignment is AlignAuto..PPSee also Qt::AlignmentFlags..PPSet this property's value with setAlignment() and get this property's value with alignment()..SH "int columns"This property holds the number of columns or rows (depending on QGroupBox::orientation) in the group box..PPUsually it is not a good idea to set this property because it is slow (it does a complete layout). It is better to set the number of columns directly in the constructor..PPSet this property's value with setColumns() and get this property's value with columns()..SH "bool flat"This property holds whether the group box is painted flat or has a frame around it..PPBy 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..PPSee also title..PPSet this property's value with setFlat() and get this property's value with isFlat()..SH "Orientation orientation"This property holds the current orientation of the group box..PPA horizontal group box arranges it's children in columns, while a vertical group box arranges them in rows. Thus, a horizontal group box with only one column will arrange the children vertically in that column..PPUsually it is not a good idea to set this property because it is slow (it does a complete layout). It is better to set the orientation directly in the constructor..PPSet this property's value with setOrientation() and get this property's value with orientation()..SH "QString title"This property holds the group box title text..PPThe group box title text will have a focus-change keyboard accelerator if the title contains &, followed by a letter..PP.nf.br      g->setTitle( "&User information" );.br.fiThis produces "User information" with the U underlined; Alt+U moves the keyboard focus to the group box..PPThere is no default title text..PPSet this property's value with setTitle() and get this property's value with title()..SH "SEE ALSO".BR http://doc.trolltech.com/qgroupbox.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qgroupbox.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -