📄 qgroupbox.3qt
字号:
'\" t.TH QGroupBox 3qt "17 July 2003" "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.br.PP\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 " "columns" ", Orientation " "o" ", QWidget * " "parent" "=0, const char * " "name" "=0 ) ".br.ti -1c.BI "\fBQGroupBox\fR ( int " "columns" ", Orientation " "o" ", const QString & " "title" ", QWidget * " "parent" "=0, const char * " "name" "=0 ) ".br.ti -1c.BI "virtual void \fBsetColumnLayout\fR ( int " "columns" ", Orientation o ) ".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 "void \fBaddSpace\fR ( int ) ".br.in -1c.SS "Properties".nf.TSl l l l l- - - - -l l l l l.Type Name READ WRITE OptionsQString title title setTitleAlignment alignment alignment setAlignmentOrientation orientation orientation setOrientation DESIGNABLE falseint columns columns setColumns.TE.fi.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' 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 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..PPQGroupBox also lets you set the title() (normally set in the constructor) and if you so please, even the title's alignment()..PP.ce 1.B "[Image Omitted]".PPSee also QButtonGroup..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 a title..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 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..PPUse 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..SH "int QGroupBox::alignment () const"Returns the alignment of the group box title..PPThe default alignment is \fCAlignLeft.\fR.PPSee also setAlignment() and Qt::AlignmentFlags..SH "void QGroupBox::childEvent ( QChildEvent * c ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QObject..SH "int QGroupBox::columns () const"Returns the numbers of columns in the groupbox as passed to the constructor, setColumns() or setColumnLayout()..SH "bool QGroupBox::event ( QEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QObject..SH "void QGroupBox::focusInEvent ( QFocusEvent * ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QGroupBox::fontChange ( const QFont & oldFont ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "Orientation QGroupBox::orientation () const"Returns the current orientation of the groupbox..PPSee also setOrientation()..SH "void QGroupBox::paintEvent ( QPaintEvent * event ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QGroupBox::resizeEvent ( QResizeEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QGroupBox::setAlignment ( int alignment ) \fC[virtual]\fR"Sets 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 \fIalignment\fR parameter..PPThe \fIalignment\fR is one of the following flags:.TP\fCAlignLeft\fR aligns the title text to the left..TP\fCAlignRight\fR aligns the title text to the right..TP\fCAlignHCenter\fR aligns the title text centered..PPSee also alignment() and Qt::AlignmentFlags..SH "void QGroupBox::setColumnLayout ( int columns, Orientation direction ) \fC[virtual]\fR"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..PPSee also setOrientation() and setColumns()..SH "void QGroupBox::setColumns ( int c )"Changes the numbers of columns to \fIc.\fR Usually it is no good idea to use the method since it is slow (it does a complete layout). Better set the numbers of columns directly in the constructor..PPSee also column() and setColumnLayout()..SH "void QGroupBox::setOrientation ( Qt::Orientation o )"Changes the orientation of the groupbox. Usually it is no good idea to use the method since it is slow (it does a complete layout). Better set the orientation directly in the constructor..PPSee also orientation()..SH "void QGroupBox::setTitle ( const QString & title ) \fC[virtual]\fR"Sets the group box title text to \fItitle,\fR and add a focus-change accelerator if the \fItitle\fR contains & followed by an appropriate letter. This produces "User information" with the U underscored and Alt-U moves the keyboard focus into the group:.PP.nf.br g->setTitle( "&User information" );.fi.SH "QSize QGroupBox::sizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "QString QGroupBox::title () const"Returns the group box title text..SH "void QGroupBox::updateMask () \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..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 make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qgroupbox.3qt) and the Qtversion (2.3.7).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -