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

📄 qsizepolicy.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QSizePolicy 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 NAMEQSizePolicy \- Layout attribute describing horizontal and vertical resizing policy.SH SYNOPSIS\fC#include <qsizepolicy.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBSizeType\fR { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow | MayShrink, MinimumExpanding = MayGrow | ExpMask, Expanding = MayGrow | MayShrink | ExpMask, Ignored = ExpMask }".br.ti -1c.BI "enum \fBExpandData\fR { NoDirection = 0, Horizontally = 1, Vertically = 2, Horizontal = Horizontally, Vertical = Vertically, BothDirections = Horizontally | Vertically }".br.ti -1c.BI "\fBQSizePolicy\fR ()".br.ti -1c.BI "\fBQSizePolicy\fR ( SizeType hor, SizeType ver, bool hfw = FALSE )".br.ti -1c.BI "\fBQSizePolicy\fR ( SizeType hor, SizeType ver, uchar horStretch, uchar verStretch, bool hfw = FALSE )".br.ti -1c.BI "SizeType \fBhorData\fR () const".br.ti -1c.BI "SizeType \fBverData\fR () const".br.ti -1c.BI "bool \fBmayShrinkHorizontally\fR () const".br.ti -1c.BI "bool \fBmayShrinkVertically\fR () const".br.ti -1c.BI "bool \fBmayGrowHorizontally\fR () const".br.ti -1c.BI "bool \fBmayGrowVertically\fR () const".br.ti -1c.BI "ExpandData \fBexpanding\fR () const".br.ti -1c.BI "void \fBsetHorData\fR ( SizeType d )".br.ti -1c.BI "void \fBsetVerData\fR ( SizeType d )".br.ti -1c.BI "void \fBsetHeightForWidth\fR ( bool b )".br.ti -1c.BI "bool \fBhasHeightForWidth\fR () const".br.ti -1c.BI "bool \fBoperator==\fR ( const QSizePolicy & s ) const".br.ti -1c.BI "bool \fBoperator!=\fR ( const QSizePolicy & s ) const".br.ti -1c.BI "uint \fBhorStretch\fR () const".br.ti -1c.BI "uint \fBverStretch\fR () const".br.ti -1c.BI "void \fBsetHorStretch\fR ( uchar sf )".br.ti -1c.BI "void \fBsetVerStretch\fR ( uchar sf )".br.ti -1c.BI "void \fBtranspose\fR ()".br.in -1c.SH DESCRIPTIONThe QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy..PPThe size policy of a widget is an expression of its willingness to be resized in various ways..PPWidgets that reimplement QWidget::sizePolicy() return a QSizePolicy that describes the horizontal and vertical resizing policy they prefer when being laid out. Only one of the constructors is of interest in most applications..PPQSizePolicy contains two independent SizeType objects; one describes the widgets's horizontal size policy, and the other describes its vertical size policy. It also contains a flag to indicate whether the height and width of its preferred size are related..PPThe horizontal and vertical SizeTypes are set in the usual constructor and can be queried using a variety of functions..PPThe hasHeightForWidth() flag indicates whether the widget's sizeHint() is width-dependent (such as a word-wrapping label) or not..PPSee also QSizePolicy::SizeType, Widget Appearance and Style, and Layout Management..SS "Member Type Documentation".SH "QSizePolicy::ExpandData"This enum type describes in which directions a widget can make use of extra space. There are four possible values:.TP\fCQSizePolicy::NoDirection\fR - the widget cannot make use of extra space in any direction..TP\fCQSizePolicy::Horizontally\fR - the widget can usefully be wider than the sizeHint()..TP\fCQSizePolicy::Vertically\fR - the widget can usefully be taller than the sizeHint()..TP\fCQSizePolicy::BothDirections\fR - the widget can usefully be both wider and taller than the sizeHint()..SH "QSizePolicy::SizeType"The per-dimension sizing types used when constructing a QSizePolicy are:.TP\fCQSizePolicy::Fixed\fR - the QWidget::sizeHint() is the only acceptable alternative, so the widget can never grow or shrink (e.g. the vertical direction of a push button)..TP\fCQSizePolicy::Minimum\fR - the sizeHint() is minimal, and sufficient. The widget can be expanded, but there is no advantage to it being larger (e.g. the horizontal direction of a push button)..TP\fCQSizePolicy::Maximum\fR - the sizeHint() is a maximum. The widget can be shrunk any amount without detriment if other widgets need the space (e.g. a separator line)..TP\fCQSizePolicy::Preferred\fR - the sizeHint() is best, but the widget can be shrunk and still be useful. The widget can be expanded, but there is no advantage to it being larger than sizeHint() (the default QWidget policy)..TP\fCQSizePolicy::Expanding\fR - the sizeHint() is a sensible size, but the widget can be shrunk and still be useful. The widget can make use of extra space, so it should get as much space as possible (e.g. the horizontal direction of a slider)..TP\fCQSizePolicy::MinimumExpanding\fR - the sizeHint() is minimal, and sufficient. The widget can make use of extra space, so it should get as much space as possible (e.g. the horizontal direction of a slider)..TP\fCQSizePolicy::Ignored\fR - the sizeHint() is ignored. The widget will get as much space as possible..SH MEMBER FUNCTION DOCUMENTATION.SH "QSizePolicy::QSizePolicy ()"Constructs a minimally initialized QSizePolicy..SH "QSizePolicy::QSizePolicy ( SizeType hor, SizeType ver, bool hfw = FALSE )"This is the constructor normally used to return a value in the overridden QWidget::sizePolicy() function of a QWidget subclass..PPIt constructs a QSizePolicy with independent horizontal and vertical sizing types, \fIhor\fR and \fIver\fR respectively. These sizing types affect how the widget is treated by the layout engine..PPIf \fIhfw\fR is TRUE, the preferred height of the widget is dependent on the width of the widget (for example, a QLabel with line wrapping)..PPSee also horData(), verData(), and hasHeightForWidth()..SH "QSizePolicy::QSizePolicy ( SizeType hor, SizeType ver, uchar horStretch, uchar verStretch, bool hfw = FALSE )"Constructs a QSizePolicy with independent horizontal and vertical sizing types \fIhor\fR and \fIver\fR, and stretch factors \fIhorStretch\fR and \fIverStretch\fR..PPIf \fIhfw\fR is TRUE, the preferred height of the widget is dependent on the width of the widget..PPSee also horStretch() and verStretch()..SH "ExpandData QSizePolicy::expanding () const"Returns whether this layout can make use of more space than sizeHint(). A value of Vertical or Horizontal means that it wants to grow in only one dimension, whereas BothDirections means that it wants to grow in both dimensions..PPSee also mayShrinkHorizontally(), mayGrowHorizontally(), mayShrinkVertically(), and mayGrowVertically()..SH "bool QSizePolicy::hasHeightForWidth () const"Returns TRUE if the widget's preferred height depends on its width; otherwise returns FALSE..PPSee also setHeightForWidth()..SH "SizeType QSizePolicy::horData () const"Returns the horizontal component of the size policy..PPSee also setHorData(), verData(), and horStretch()..SH "uint QSizePolicy::horStretch () const"Returns the horizontal stretch factor of the size policy..PPSee also setHorStretch() and verStretch()..SH "bool QSizePolicy::mayGrowHorizontally () const"Returns TRUE if the widget can sensibly be wider than its sizeHint(); otherwise returns FALSE..PPSee also mayGrowVertically() and mayShrinkHorizontally()..SH "bool QSizePolicy::mayGrowVertically () const"Returns TRUE if the widget can sensibly be taller than its sizeHint(); otherwise returns FALSE..PPSee also mayGrowHorizontally() and mayShrinkVertically()..SH "bool QSizePolicy::mayShrinkHorizontally () const"Returns TRUE if the widget can sensibly be narrower than its sizeHint(); otherwise returns FALSE..PPSee also mayShrinkVertically() and mayGrowHorizontally()..SH "bool QSizePolicy::mayShrinkVertically () const"Returns TRUE if the widget can sensibly be shorter than its sizeHint(); otherwise returns FALSE..PPSee also mayShrinkHorizontally() and mayGrowVertically()..SH "bool QSizePolicy::operator!= ( const QSizePolicy & s ) const"Returns TRUE if this policy is different from \fIs\fR; otherwise returns FALSE..PPSee also operator==()..SH "bool QSizePolicy::operator== ( const QSizePolicy & s ) const"Returns TRUE if this policy is equal to \fIs\fR; otherwise returns FALSE..PPSee also operator!=()..SH "void QSizePolicy::setHeightForWidth ( bool b )"Sets the hasHeightForWidth() flag to \fIb\fR..PPSee also hasHeightForWidth()..SH "void QSizePolicy::setHorData ( SizeType d )"Sets the horizontal component of the size policy to size type \fId\fR..PPSee also horData() and setVerData()..SH "void QSizePolicy::setHorStretch ( uchar sf )"Sets the horizontal stretch factor of the size policy to \fIsf\fR..PPSee also horStretch() and setVerStretch()..SH "void QSizePolicy::setVerData ( SizeType d )"Sets the vertical component of the size policy to size type \fId\fR..PPSee also verData() and setHorData()..SH "void QSizePolicy::setVerStretch ( uchar sf )"Sets the vertical stretch factor of the size policy to \fIsf\fR..PPSee also verStretch() and setHorStretch()..SH "void QSizePolicy::transpose ()"Swaps the horizontal and vertical policies and stretches..SH "SizeType QSizePolicy::verData () const"Returns the vertical component of the size policy..PPSee also setVerData(), horData(), and verStretch()..SH "uint QSizePolicy::verStretch () const"Returns the vertical stretch factor of the size policy..PPSee also setVerStretch() and horStretch()..SH "SEE ALSO".BR http://doc.trolltech.com/qsizepolicy.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 (qsizepolicy.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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