Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QSizePolicy QWidget::sizePolicy [read, write, inherited]

the default layout behavior of the widget

If there is a QLayout that manages this widget's children, the size policy specified by that layout is used. If there is no such QLayout, the result of this function is used.

The default policy is Preferred/Preferred, which means that the widget can be freely resized, but prefers to be the size sizeHint() returns. Button-like widgets set the size policy to specify that they may stretch horizontally, but are fixed vertically. The same applies to lineedit controls (such as QLineEdit, QSpinBox or an editable QComboBox) and other horizontally orientated widgets (such as QProgressBar). QToolButton's are normally square, so they allow growth in both directions. Widgets that support different directions (such as QSlider, QScrollBar or QHeader) specify stretching in the respective direction only. Widgets that can provide scroll bars (usually subclasses of QScrollArea) tend to specify that they can use additional space, and that they can make do with less than sizeHint().

See also:
sizeHint() QLayout QSizePolicy updateGeometry()

Definition at line 163 of file qwidget.h.

Referenced by QLayoutItem::controlTypes(), QWidgetItem::expandingDirections(), QWidgetItem::hasHeightForWidth(), QLabel::minimumSizeHint(), Q3WidgetStack::minimumSizeHint(), QHelpSearchQueryWidget::QHelpSearchQueryWidget(), QWidgetItem::setGeometry(), QSplitter::setStretchFactor(), Q3WidgetStack::sizeHint(), QStackedLayout::sizeHint(), and QWidgetItem::sizeHint().


Generated by  Doxygen 1.6.0   Back to index