A layout attribute describing horizontal and vertical resizing. More...
#include <qsizepolicy.h>
Widgets which override QWidget::sizePolicy() return a QSizePolicy describing the horizontal and vertical resizing policy best used when laying out the widget.
Only the constructor is of interest in most applications.
Fixed
- the sizeHint() is the only acceptable alternative,
so never grow or shrink
(eg. the vertical direction of a pushbutton)
Minimum
- the sizeHint() is minimal, and sufficient. The widget
can be expanded, but there is no advantage to it being larger.
(eg. the horizontal direction of a pushbutton)
Maximum
- the sizeHint() is a maximum, the widget can be shrunk
any amount without detriment if other widgets need the space
(eg. a separator line)
Preferred
- the sizeHint() is best, but the widget can
be shrunk below that and still be useful. The widget
can be expanded, but there is no advantage to it being
larger than sizeHint()
(the default QWidget policy)
MinimumExpanding
- the sizeHint() is a minimum,
the widget can make use of extra space, so it
should get as much space as possible.
(not currently used by any standard Qt widgets)
Expanding
- the sizeHint() is a sensible size, but the widget can
be shrunk below that and still be useful.
The widget can make use of extra space, so it should
get as much space as possible.
(eg. the horizontal direction of a slider)
Default constructor, produces a minimally initialized QSizePolicy.
This is the constructor normally used to return a value in the overridden sizeHint() function of a QWidget subclass.
It constructs a QSizePolicy with independent horizontal and vertical sizing types, hor and ver respectively. These sizing types affect how the widget is treated by the link QLayout layout engine\endlink.
If hfw is TRUE, the preferred height of the widget is dependent on the width of the widget (for example, a QLabel with automatic word-breaking).
Returns TRUE if the widget's preferred height depends on its width.
Returns the horizontal component of the size policy.
Returns TRUE if the widget can sensibly be wider than its sizeHint().
Returns TRUE if the widget can sensibly be taller than its sizeHint().
Returns TRUE if the widget can sensibly be narrower than its sizeHint().
Returns TRUE if the widget can sensibly be lower than its sizeHint().
Sets the hasHeightForWidth() flag to b.
Sets the horizontal component of the size policy to d.
Sets the vertical component of the size policy to d.
Returns the vertical component of the size policy.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.
Copyright © 1999 Troll Tech | Trademarks | Qt version 2.0.2
|