1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSizePolicy Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSizePolicy Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QSizePolicy class is a layout attribute describing
horizontal and vertical resizing policy. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qsizepolicy.html#ControlType-enum">ControlType</a></b> { DefaultType, ButtonBox, CheckBox, ComboBox, ..., ToolButton }</li><li><div class="fn" />class <b><a href="qsizepolicy-controltypes.html">ControlTypes</a></b></li><li><div class="fn" />enum <b><a href="qsizepolicy.html#Policy-enum">Policy</a></b> { Fixed, Minimum, Maximum, Preferred, ..., Ignored }</li><li><div class="fn" />enum <b><a href="qsizepolicy.html#PolicyFlag-enum">PolicyFlag</a></b> { GrowFlag, ExpandFlag, ShrinkFlag, IgnoreFlag }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-2">__init__</a></b> (<i>self</i>, Policy <i>horizontal</i>, Policy <i>vertical</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-3">__init__</a></b> (<i>self</i>, Policy <i>horizontal</i>, Policy <i>vertical</i>, ControlType <i>type</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-4">__init__</a></b> (<i>self</i>, QVariant <i>variant</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-5">__init__</a></b> (<i>self</i>, QSizePolicy)</li><li><div class="fn" />ControlType <b><a href="qsizepolicy.html#controlType">controlType</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientations <b><a href="qsizepolicy.html#expandingDirections">expandingDirections</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsizepolicy.html#hasWidthForHeight">hasWidthForHeight</a></b> (<i>self</i>)</li><li><div class="fn" />Policy <b><a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setControlType">setControlType</a></b> (<i>self</i>, ControlType <i>type</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a></b> (<i>self</i>, bool <i>b</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a></b> (<i>self</i>, Policy <i>d</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a></b> (<i>self</i>, int <i>stretchFactor</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a></b> (<i>self</i>, Policy <i>d</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a></b> (<i>self</i>, int <i>stretchFactor</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a></b> (<i>self</i>, bool <i>b</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#transpose">transpose</a></b> (<i>self</i>)</li><li><div class="fn" />Policy <b><a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsizepolicy.html#verticalStretch">verticalStretch</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qsizepolicy.html#__eq__">__eq__</a></b> (<i>self</i>, QSizePolicy <i>s</i>)</li><li><div class="fn" />bool <b><a href="qsizepolicy.html#__ne__">__ne__</a></b> (<i>self</i>, QSizePolicy <i>s</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSizePolicy class is a layout attribute describing
horizontal and vertical resizing policy.</p>
<p>The size policy of a widget is an expression of its willingness
to be resized in various ways, and affects how the widget is
treated by the <a href="layout.html">layout engine</a>. Each widget
returns a QSizePolicy that describes the horizontal and vertical
resizing policy it prefers when being laid out. You can change this
for a specific widget by changing its <a href="qwidget.html#sizePolicy-prop">QWidget.sizePolicy</a>
property.</p>
<p>QSizePolicy contains two independent <a href="qsizepolicy.html#Policy-enum">QSizePolicy.Policy</a> values and
two stretch factors; 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.</p>
<p>The horizontal and vertical policies can be set in the
constructor, and altered using the <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>()
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>()
functions. The stretch factors can be set using the <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>()
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>()
functions. The flag indicating whether the widget's <a href="qwidget.html#sizeHint-prop">sizeHint()</a> is width-dependent
(such as a menu bar or a word-wrapping label) can be set using the
<a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>()
function.</p>
<p>The current size policies and stretch factors be retrieved using
the <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(),
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(),
<a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>() and
<a href="qsizepolicy.html#verticalStretch">verticalStretch</a>()
functions. Alternatively, use the <a href="qsizepolicy.html#transpose">transpose</a>() function to swap the
horizontal and vertical policies and stretches. The <a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a>()
function returns the current status of the flag indicating the size
hint dependencies.</p>
<p>Use the <a href="qsizepolicy.html#expandingDirections">expandingDirections</a>()
function to determine whether the associated widget can make use of
more space than its <a href="qwidget.html#sizeHint-prop">sizeHint()</a> function indicates, as
well as find out in which directions it can expand.</p>
<p>Finally, the QSizePolicy class provides operators comparing this
size policy to a given policy, as well as a <a href="qvariant.html">QVariant</a> operator storing this QSizePolicy as a
<a href="qvariant.html">QVariant</a> object.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ControlType-enum" />QSizePolicy.ControlType</h3><p>This enum specifies the different types of widgets in terms of
layout interaction:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.DefaultType</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The default type, when none is specified.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ButtonBox</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">A <a href="qdialogbuttonbox.html">QDialogButtonBox</a> instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.CheckBox</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">A <a href="qcheckbox.html">QCheckBox</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ComboBox</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">A <a href="qcombobox.html">QComboBox</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Frame</tt></td>
<td class="topAlign"><tt>0x00000010</tt></td>
<td class="topAlign">A <a href="qframe.html">QFrame</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.GroupBox</tt></td>
<td class="topAlign"><tt>0x00000020</tt></td>
<td class="topAlign">A <a href="qgroupbox.html">QGroupBox</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Label</tt></td>
<td class="topAlign"><tt>0x00000040</tt></td>
<td class="topAlign">A <a href="qlabel.html">QLabel</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Line</tt></td>
<td class="topAlign"><tt>0x00000080</tt></td>
<td class="topAlign">A <a href="qframe.html">QFrame</a> instance
with <a href="qframe.html#Shape-enum">QFrame.HLine</a> or <a href="qframe.html#Shape-enum">QFrame.VLine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.LineEdit</tt></td>
<td class="topAlign"><tt>0x00000100</tt></td>
<td class="topAlign">A <a href="qlineedit.html">QLineEdit</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.PushButton</tt></td>
<td class="topAlign"><tt>0x00000200</tt></td>
<td class="topAlign">A <a href="qpushbutton.html">QPushButton</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.RadioButton</tt></td>
<td class="topAlign"><tt>0x00000400</tt></td>
<td class="topAlign">A <a href="qradiobutton.html">QRadioButton</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Slider</tt></td>
<td class="topAlign"><tt>0x00000800</tt></td>
<td class="topAlign">A <a href="qabstractslider.html">QAbstractSlider</a> instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.SpinBox</tt></td>
<td class="topAlign"><tt>0x00001000</tt></td>
<td class="topAlign">A <a href="qabstractspinbox.html">QAbstractSpinBox</a> instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.TabWidget</tt></td>
<td class="topAlign"><tt>0x00002000</tt></td>
<td class="topAlign">A <a href="qtabwidget.html">QTabWidget</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ToolButton</tt></td>
<td class="topAlign"><tt>0x00004000</tt></td>
<td class="topAlign">A <a href="qtoolbutton.html">QToolButton</a>
instance.</td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.3.</p>
<p>The ControlTypes type is a typedef for <a href="qflags.html">QFlags</a><ControlType>. It stores an OR
combination of ControlType values.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setControlType">setControlType</a>() and <a href="qsizepolicy.html#controlType">controlType</a>().</p>
<h3 class="fn"><a name="Policy-enum" />QSizePolicy.Policy</h3><p>This enum describes the various per-dimension sizing types used
when constructing a <a href="qsizepolicy.html">QSizePolicy</a>.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Fixed</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>() is the only
acceptable alternative, so the widget can never grow or shrink
(e.g. the vertical direction of a push button).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Minimum</tt></td>
<td class="topAlign"><tt>GrowFlag</tt></td>
<td class="topAlign">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). It cannot
be smaller than the size provided by sizeHint().</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Maximum</tt></td>
<td class="topAlign"><tt>ShrinkFlag</tt></td>
<td class="topAlign">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). It cannot be larger than the size provided
by sizeHint().</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Preferred</tt></td>
<td class="topAlign"><tt>GrowFlag | ShrinkFlag</tt></td>
<td class="topAlign">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
<a href="qwidget.html">QWidget</a> policy).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Expanding</tt></td>
<td class="topAlign"><tt>GrowFlag | ShrinkFlag |
ExpandFlag</tt></td>
<td class="topAlign">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 horizontal slider).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.MinimumExpanding</tt></td>
<td class="topAlign"><tt>GrowFlag | ExpandFlag</tt></td>
<td class="topAlign">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 horizontal
slider).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Ignored</tt></td>
<td class="topAlign"><tt>ShrinkFlag | GrowFlag |
IgnoreFlag</tt></td>
<td class="topAlign">The sizeHint() is ignored. The widget will get
as much space as possible.</td>
</tr>
</table>
<p><b>See also</b> <a href="qsizepolicy.html#PolicyFlag-enum">PolicyFlag</a>, <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(),
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>().</p>
<h3 class="fn"><a name="PolicyFlag-enum" />QSizePolicy.PolicyFlag</h3><p>These flags are combined together to form the various <a href="qsizepolicy.html#Policy-enum">Policy</a> values:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.GrowFlag</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The widget can grow beyond its size hint if
necessary.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ExpandFlag</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The widget should get as much space as
possible.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ShrinkFlag</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The widget can shrink below its size hint if
necessary.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.IgnoreFlag</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">The widget's size hint is ignored. The widget
will get as much space as possible.</td>
</tr>
</table>
<p><b>See also</b> <a href="qsizepolicy.html#Policy-enum">Policy</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSizePolicy" />QSizePolicy.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object
with <a href="qsizepolicy.html#Policy-enum">Fixed</a> as its
horizontal and vertical policies.</p>
<p>The policies can be altered using the <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>()
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>()
functions. Use the <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>()
function if the preferred height of the widget is dependent on the
width of the widget (for example, a <a href="qlabel.html">QLabel</a> with line wrapping).</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>()
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>
<h3 class="fn"><a name="QSizePolicy-2" />QSizePolicy.__init__ (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a> <i>horizontal</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a> <i>vertical</i>)</h3><p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object
with the given <i>horizontal</i> and <i>vertical</i> policies, and
<a href="qsizepolicy.html#ControlType-enum">DefaultType</a> as the
control type.</p>
<p>Use <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() if the
preferred height of the widget is dependent on the width of the
widget (for example, a <a href="qlabel.html">QLabel</a> with line
wrapping).</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>()
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>
<h3 class="fn"><a name="QSizePolicy-3" />QSizePolicy.__init__ (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a> <i>horizontal</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a> <i>vertical</i>, <a href="qsizepolicy.html#ControlType-enum">ControlType</a> <i>type</i>)</h3><p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object
with the given <i>horizontal</i> and <i>vertical</i> policies, and
the specified control <i>type</i>.</p>
<p>Use <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() if the
preferred height of the widget is dependent on the width of the
widget (for example, a <a href="qlabel.html">QLabel</a> with line
wrapping).</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(),
<a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), and
<a href="qsizepolicy.html#controlType">controlType</a>().</p>
<h3 class="fn"><a name="QSizePolicy-4" />QSizePolicy.__init__ (<i>self</i>, QVariant <i>variant</i>)</h3><h3 class="fn"><a name="QSizePolicy-5" />QSizePolicy.__init__ (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a>)</h3><h3 class="fn"><a name="controlType" /><a href="qsizepolicy.html#ControlType-enum">ControlType</a> QSizePolicy.controlType (<i>self</i>)</h3><p>Returns the control type associated with the widget for which
this size policy applies.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setControlType">setControlType</a>().</p>
<h3 class="fn"><a name="expandingDirections" /><a href="qt-orientations.html">Qt.Orientations</a> QSizePolicy.expandingDirections (<i>self</i>)</h3><p>Returns whether a widget can make use of more space than the
<a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>()
function indicates.</p>
<p>A value of <a href="qt.html#Orientation-enum">Qt.Horizontal</a>
or <a href="qt.html#Orientation-enum">Qt.Vertical</a> means that
the widget can grow horizontally or vertically (i.e., the
horizontal or vertical policy is <a href="qsizepolicy.html#Policy-enum">Expanding</a> or <a href="qsizepolicy.html#Policy-enum">MinimumExpanding</a>), whereas
<a href="qt.html#Orientation-enum">Qt.Horizontal</a> | <a href="qt.html#Orientation-enum">Qt.Vertical</a> means that it can grow
in both dimensions.</p>
<p><b>See also</b> <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>() and
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>().</p>
<h3 class="fn"><a name="hasHeightForWidth" />bool QSizePolicy.hasHeightForWidth (<i>self</i>)</h3><p>Returns true if the widget's preferred height depends on its
width; otherwise returns false.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>().</p>
<h3 class="fn"><a name="hasWidthForHeight" />bool QSizePolicy.hasWidthForHeight (<i>self</i>)</h3><p>Returns true if the widget's width depends on its height;
otherwise returns false.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a>().</p>
<h3 class="fn"><a name="horizontalPolicy" /><a href="qsizepolicy.html#Policy-enum">Policy</a> QSizePolicy.horizontalPolicy (<i>self</i>)</h3><p>Returns the horizontal component of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(),
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), and
<a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>().</p>
<h3 class="fn"><a name="horizontalStretch" />int QSizePolicy.horizontalStretch (<i>self</i>)</h3><p>Returns the horizontal stretch factor of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(),
<a href="qsizepolicy.html#verticalStretch">verticalStretch</a>(),
and <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>().</p>
<h3 class="fn"><a name="setControlType" />QSizePolicy.setControlType (<i>self</i>, <a href="qsizepolicy.html#ControlType-enum">ControlType</a> <i>type</i>)</h3><p>Sets the control type associated with the widget for which this
size policy applies to <i>type</i>.</p>
<p>The control type specifies the type of the widget for which this
size policy applies. It is used by some styles, notably <a href="qmacstyle.html">QMacStyle</a>, to insert proper spacing between
widgets. For example, the Mac OS X Aqua guidelines specify that
push buttons should be separated by 12 pixels, whereas vertically
stacked radio buttons only require 6 pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qsizepolicy.html#controlType">controlType</a>() and <a href="qstyle.html#layoutSpacing">QStyle.layoutSpacing</a>().</p>
<h3 class="fn"><a name="setHeightForWidth" />QSizePolicy.setHeightForWidth (<i>self</i>, bool <i>b</i>)</h3><p>Sets the flag determining whether the widget's preferred height
depends on its width, to <i>dependent</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a>() and
<a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a>().</p>
<h3 class="fn"><a name="setHorizontalPolicy" />QSizePolicy.setHorizontalPolicy (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a> <i>d</i>)</h3><p>Sets the horizontal component to the given <i>policy</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(),
<a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>(),
and <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>().</p>
<h3 class="fn"><a name="setHorizontalStretch" />QSizePolicy.setHorizontalStretch (<i>self</i>, int <i>stretchFactor</i>)</h3><p>Sets the horizontal stretch factor of the size policy to the
given <i>stretchFactor</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>(),
<a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), and
<a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>().</p>
<h3 class="fn"><a name="setVerticalPolicy" />QSizePolicy.setVerticalPolicy (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a> <i>d</i>)</h3><p>Sets the vertical component to the given <i>policy</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(),
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>
<h3 class="fn"><a name="setVerticalStretch" />QSizePolicy.setVerticalStretch (<i>self</i>, int <i>stretchFactor</i>)</h3><p>Sets the vertical stretch factor of the size policy to the given
<i>stretchFactor</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>(), <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(),
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>().</p>
<h3 class="fn"><a name="setWidthForHeight" />QSizePolicy.setWidthForHeight (<i>self</i>, bool <i>b</i>)</h3><p>Sets the flag determining whether the widget's width depends on
its height, to <i>dependent</i>.</p>
<p>This is only supported for <a href="qgraphicslayout.html">QGraphicsLayout</a>'s subclasses. It is not
possible to have a layout with both height-for-width and
width-for-height constraints at the same time.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also</b> <a href="qsizepolicy.html#hasWidthForHeight">hasWidthForHeight</a>() and
<a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>().</p>
<h3 class="fn"><a name="transpose" />QSizePolicy.transpose (<i>self</i>)</h3><p>Swaps the horizontal and vertical policies and stretches.</p>
<h3 class="fn"><a name="verticalPolicy" /><a href="qsizepolicy.html#Policy-enum">Policy</a> QSizePolicy.verticalPolicy (<i>self</i>)</h3><p>Returns the vertical component of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>(),
<a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(),
and <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>().</p>
<h3 class="fn"><a name="verticalStretch" />int QSizePolicy.verticalStretch (<i>self</i>)</h3><p>Returns the vertical stretch factor of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(),
<a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>(), and
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>().</p>
<h3 class="fn"><a name="__eq__" />bool QSizePolicy.__eq__ (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a> <i>s</i>)</h3><h3 class="fn"><a name="__ne__" />bool QSizePolicy.__ne__ (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a> <i>s</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.12.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt 4.8.7</td></tr></table></div></address></body></html>
|