File: qgraphicslayoutitem.html

package info (click to toggle)
python-qt4 4.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 40,300 kB
  • ctags: 6,185
  • sloc: python: 125,988; cpp: 13,291; xml: 292; makefile: 246; php: 27; sh: 2
file content (396 lines) | stat: -rw-r--r-- 36,493 bytes parent folder | download
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
<?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>QGraphicsLayoutItem 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">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGraphicsLayoutItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsLayoutItem class can be inherited to allow your
custom items to be managed by layouts. <a href="#details">More...</a></p>

<p>Inherited by <a href="qgraphicslayout.html">QGraphicsLayout</a> and <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">__init__</a></b> (<i>self</i>, QGraphicsLayoutItem&#160;<i>parent</i>&#160;=&#160;None, bool&#160;<i>isLayout</i>&#160;=&#160;False)</li><li><div class="fn" />QRectF <b><a href="qgraphicslayoutitem.html#contentsRect">contentsRect</a></b> (<i>self</i>)</li><li><div class="fn" />QSizeF <b><a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a></b> (<i>self</i>, Qt.SizeHint&#160;<i>which</i>, QSizeF&#160;<i>constraint</i>&#160;=&#160;QSizeF())</li><li><div class="fn" />QRectF <b><a href="qgraphicslayoutitem.html#geometry">geometry</a></b> (<i>self</i>)</li><li><div class="fn" />(float&#160;<i>left</i>, float&#160;<i>top</i>, float&#160;<i>right</i>, float&#160;<i>bottom</i>) <b><a href="qgraphicslayoutitem.html#getContentsMargins">getContentsMargins</a></b> (<i>self</i>)</li><li><div class="fn" />QGraphicsItem <b><a href="qgraphicslayoutitem.html#graphicsItem">graphicsItem</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicslayoutitem.html#isLayout">isLayout</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qgraphicslayoutitem.html#maximumHeight">maximumHeight</a></b> (<i>self</i>)</li><li><div class="fn" />QSizeF <b><a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qgraphicslayoutitem.html#maximumWidth">maximumWidth</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qgraphicslayoutitem.html#minimumHeight">minimumHeight</a></b> (<i>self</i>)</li><li><div class="fn" />QSizeF <b><a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qgraphicslayoutitem.html#minimumWidth">minimumWidth</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicslayoutitem.html#ownedByLayout">ownedByLayout</a></b> (<i>self</i>)</li><li><div class="fn" />QGraphicsLayoutItem <b><a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qgraphicslayoutitem.html#preferredHeight">preferredHeight</a></b> (<i>self</i>)</li><li><div class="fn" />QSizeF <b><a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qgraphicslayoutitem.html#preferredWidth">preferredWidth</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRectF&#160;<i>rect</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setGraphicsItem">setGraphicsItem</a></b> (<i>self</i>, QGraphicsItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMaximumHeight">setMaximumHeight</a></b> (<i>self</i>, float&#160;<i>height</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a></b> (<i>self</i>, QSizeF&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMaximumSize-2">setMaximumSize</a></b> (<i>self</i>, float&#160;<i>aw</i>, float&#160;<i>ah</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMaximumWidth">setMaximumWidth</a></b> (<i>self</i>, float&#160;<i>width</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMinimumHeight">setMinimumHeight</a></b> (<i>self</i>, float&#160;<i>height</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a></b> (<i>self</i>, QSizeF&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMinimumSize-2">setMinimumSize</a></b> (<i>self</i>, float&#160;<i>aw</i>, float&#160;<i>ah</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a></b> (<i>self</i>, float&#160;<i>width</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setOwnedByLayout">setOwnedByLayout</a></b> (<i>self</i>, bool&#160;<i>ownedByLayout</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setParentLayoutItem">setParentLayoutItem</a></b> (<i>self</i>, QGraphicsLayoutItem&#160;<i>parent</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setPreferredHeight">setPreferredHeight</a></b> (<i>self</i>, float&#160;<i>height</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a></b> (<i>self</i>, QSizeF&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setPreferredSize-2">setPreferredSize</a></b> (<i>self</i>, float&#160;<i>aw</i>, float&#160;<i>ah</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setPreferredWidth">setPreferredWidth</a></b> (<i>self</i>, float&#160;<i>width</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a></b> (<i>self</i>, QSizePolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#setSizePolicy-2">setSizePolicy</a></b> (<i>self</i>, QSizePolicy.Policy&#160;<i>hPolicy</i>, QSizePolicy.Policy&#160;<i>vPolicy</i>, QSizePolicy.ControlType&#160;<i>controlType</i>&#160;=&#160;QSizePolicy.DefaultType)</li><li><div class="fn" />QSizeF <b><a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a></b> (<i>self</i>, Qt.SizeHint&#160;<i>which</i>, QSizeF&#160;<i>constraint</i>&#160;=&#160;QSizeF())</li><li><div class="fn" />QSizePolicy <b><a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicslayoutitem.html#updateGeometry">updateGeometry</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsLayoutItem class can be inherited to allow your
custom items to be managed by layouts.</p>
<p>QGraphicsLayoutItem is an abstract class that defines a set of
virtual functions describing sizes, size policies, and size hints
for any object arranged by <a href="qgraphicslayout.html">QGraphicsLayout</a>. The API contains
functions relevant for both the item itself and for the user of the
item as most of QGraphicsLayoutItem's functions are also part of
the subclass' public API.</p>
<p>In most cases, existing layout-aware classes such as <a href="qgraphicswidget.html">QGraphicsWidget</a> and <a href="qgraphicslayout.html">QGraphicsLayout</a> already provide the
functionality you require. However, subclassing these classes will
enable you to create both graphical elements that work well with
layouts (<a href="qgraphicswidget.html">QGraphicsWidget</a>) or
custom layouts (<a href="qgraphicslayout.html">QGraphicsLayout</a>).</p>
<a id="subclassing-qgraphicslayoutitem" name="subclassing-qgraphicslayoutitem" />
<h3>Subclassing QGraphicsLayoutItem</h3>
<p>If you create a subclass of QGraphicsLayoutItem and reimplement
its virtual functions, you will enable the layout to resize and
position your item along with other QGraphicsLayoutItems including
<a href="qgraphicswidget.html">QGraphicsWidget</a> and <a href="qgraphicslayout.html">QGraphicsLayout</a>.</p>
<p>You can start by reimplementing important functions: the
protected <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() function, as
well as the public <a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a>() function.
If you want your items to be aware of immediate geometry changes,
you can also reimplement <a href="qgraphicslayoutitem.html#updateGeometry">updateGeometry</a>().</p>
<p>The geometry, size hint, and size policy affect the item's size
and position. Calling <a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a>() will
always resize and reposition the item immediately. Normally, this
function is called by <a href="qgraphicslayout.html">QGraphicsLayout</a> after the layout has
been activated, but it can also be called by the item's user at any
time.</p>
<p>The <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>()
function returns the item' minimum, preferred and maximum size
hints. You can override these properties by calling <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>()
or <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(). You
can also use functions such as <a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a>() or
<a href="qgraphicslayoutitem.html#setMaximumHeight">setMaximumHeight</a>()
to set only the width or height component if desired.</p>
<p>The <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>()
function, on the other hand, returns a size hint for any given
<a href="qt.html#SizeHint-enum">Qt.SizeHint</a>, and guarantees
that the returned size is bound to the minimum and maximum sizes
and size hints. You can set the item's vertical and horizontal size
policy by calling <a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a>(). The
sizePolicy property is used by the layout system to describe how
this item prefers to grow or shrink.</p>
<a id="nesting-qgraphicslayoutitems" name="nesting-qgraphicslayoutitems" />
<h3>Nesting QGraphicsLayoutItems</h3>
<p>QGraphicsLayoutItems can be nested within other
QGraphicsLayoutItems, similar to layouts that can contain
sublayouts. This is done either by passing a QGraphicsLayoutItem
pointer to QGraphicsLayoutItem's protected constructor, or by
calling <a href="qgraphicslayoutitem.html#setParentLayoutItem">setParentLayoutItem</a>().
The <a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a>()
function returns a pointer to the item's layoutItem parent. If the
item's parent is 0 or if the parent does not inherit from <a href="qgraphicsitem.html">QGraphicsItem</a>, the <a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a>()
function then returns 0. <a href="qgraphicslayoutitem.html#isLayout">isLayout</a>() returns true if
the QGraphicsLayoutItem subclass is itself a layout, or false
otherwise.</p>
<p>Qt uses QGraphicsLayoutItem to provide layout functionality in
the <a href="graphicsview.html">Graphics View Framework</a>, but in
the future its use may spread throughout Qt itself.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsLayoutItem" />QGraphicsLayoutItem.__init__ (<i>self</i>, <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>&#160;<i>parent</i>&#160;=&#160;None, bool&#160;<i>isLayout</i>&#160;=&#160;False)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> object.
<i>parent</i> becomes the object's parent. If <i>isLayout</i> is
true the item is a layout, otherwise <i>isLayout</i> is false.</p>


<h3 class="fn"><a name="contentsRect" /><a href="qrectf.html">QRectF</a> QGraphicsLayoutItem.contentsRect (<i>self</i>)</h3><p>Returns the contents rect in local coordinates.</p>
<p>The contents rect defines the subrectangle used by an associated
layout when arranging subitems. This function is a convenience
function that adjusts the item's <a href="qgraphicslayoutitem.html#geometry">geometry</a>() by its contents
margins. Note that <a href="qgraphicslayoutitem.html#getContentsMargins">getContentsMargins</a>()
is a virtual function that you can reimplement to return the item's
contents margins.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#getContentsMargins">getContentsMargins</a>()
and <a href="qgraphicslayoutitem.html#geometry">geometry</a>().</p>


<h3 class="fn"><a name="effectiveSizeHint" /><a href="qsizef.html">QSizeF</a> QGraphicsLayoutItem.effectiveSizeHint (<i>self</i>, <a href="qt.html#SizeHint-enum">Qt.SizeHint</a>&#160;<i>which</i>, <a href="qsizef.html">QSizeF</a>&#160;<i>constraint</i>&#160;=&#160;QSizeF())</h3><p>Returns the effective size hint for this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>.</p>
<p><i>which</i> is the size hint in question. <i>constraint</i> is
an optional argument that defines a special constrain when
calculating the effective size hint. By default, <i>constraint</i>
is <a href="qsizef.html">QSizeF</a>(-1, -1), which means there is
no constraint to the size hint.</p>
<p>If you want to specify the widget's size hint for a given width
or height, you can provide the fixed dimension in
<i>constraint</i>. This is useful for widgets that can grow only
either vertically or horizontally, and need to set either their
width or their height to a special value.</p>
<p>For example, a text paragraph item fit into a column width of
200 may grow vertically. You can pass <a href="qsizef.html">QSizeF</a>(200, -1) as a constraint to get a suitable
minimum, preferred and maximum height).</p>
<p>You can adjust the effective size hint by reimplementing
<a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() in a
<a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>
subclass, or by calling one of the following functions: <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(),
setPreferredSize, or <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>() (or
a combination of both).</p>
<p>This function caches each of the size hints and guarantees that
<a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() will be
called only once for each value of <i>which</i> - unless
<i>constraint</i> is not specified and <a href="qgraphicslayoutitem.html#updateGeometry">updateGeometry</a>() has
been called.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="geometry" /><a href="qrectf.html">QRectF</a> QGraphicsLayoutItem.geometry (<i>self</i>)</h3><p>Returns the item's geometry (e.g., position and size) as a
<a href="qrectf.html">QRectF</a>. This function is equivalent to
<a href="qrectf.html">QRectF</a>(pos(), size()).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a>().</p>


<h3 class="fn"><a name="getContentsMargins" />(float&#160;<i>left</i>, float&#160;<i>top</i>, float&#160;<i>right</i>, float&#160;<i>bottom</i>) QGraphicsLayoutItem.getContentsMargins (<i>self</i>)</h3><p>This virtual function provides the <i>left</i>, <i>top</i>,
<i>right</i> and <i>bottom</i> contents margins for this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>. The default
implementation assumes all contents margins are 0. The parameters
point to values stored in qreals. If any of the pointers is 0, that
value will not be updated.</p>
<p><b>See also</b> <a href="qgraphicswidget.html#setContentsMargins">QGraphicsWidget.setContentsMargins</a>().</p>


<h3 class="fn"><a name="graphicsItem" /><a href="qgraphicsitem.html">QGraphicsItem</a> QGraphicsLayoutItem.graphicsItem (<i>self</i>)</h3><p>Returns the <a href="qgraphicsitem.html">QGraphicsItem</a> that
this layout item represents. For <a href="qgraphicswidget.html">QGraphicsWidget</a> it will return itself.
For custom items it can return an aggregated value.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setGraphicsItem">setGraphicsItem</a>().</p>


<h3 class="fn"><a name="isLayout" />bool QGraphicsLayoutItem.isLayout (<i>self</i>)</h3><p>Returns true if this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> is a layout
(e.g., is inherited by an object that arranges other <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> objects);
otherwise returns false.</p>
<p><b>See also</b> <a href="qgraphicslayout.html">QGraphicsLayout</a>.</p>


<h3 class="fn"><a name="maximumHeight" />float QGraphicsLayoutItem.maximumHeight (<i>self</i>)</h3><p>Returns the maximum height.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setMaximumHeight">setMaximumHeight</a>(),
<a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and
<a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>


<h3 class="fn"><a name="maximumSize" /><a href="qsizef.html">QSizeF</a> QGraphicsLayoutItem.maximumSize (<i>self</i>)</h3><p>Returns the maximum size.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(),
<a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(),
<a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(),
<a href="qt.html#SizeHint-enum">Qt.MaximumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="maximumWidth" />float QGraphicsLayoutItem.maximumWidth (<i>self</i>)</h3><p>Returns the maximum width.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setMaximumWidth">setMaximumWidth</a>(),
<a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and
<a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>


<h3 class="fn"><a name="minimumHeight" />float QGraphicsLayoutItem.minimumHeight (<i>self</i>)</h3><p>Returns the minimum height.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setMinimumHeight">setMinimumHeight</a>(),
<a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and
<a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>


<h3 class="fn"><a name="minimumSize" /><a href="qsizef.html">QSizeF</a> QGraphicsLayoutItem.minimumSize (<i>self</i>)</h3><p>Returns the minimum size.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(),
<a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(),
<a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(),
<a href="qt.html#SizeHint-enum">Qt.MinimumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="minimumWidth" />float QGraphicsLayoutItem.minimumWidth (<i>self</i>)</h3><p>Returns the minimum width.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a>(),
<a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and
<a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>


<h3 class="fn"><a name="ownedByLayout" />bool QGraphicsLayoutItem.ownedByLayout (<i>self</i>)</h3><p>Returns whether a layout should delete this item in its
destructor. If its true, then the layout will delete it. If its
false, then it is assumed that another object has the ownership of
it, and the layout won't delete this item.</p>
<p>If the item inherits both <a href="qgraphicsitem.html">QGraphicsItem</a> and <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> (such as
<a href="qgraphicswidget.html">QGraphicsWidget</a> does) the item
is really part of two ownership hierarchies. This property informs
what the layout should do with its child items when it is
destructed. In the case of <a href="qgraphicswidget.html">QGraphicsWidget</a>, it is preferred that
when the layout is deleted it won't delete its children (since they
are also part of the graphics item hierarchy).</p>
<p>By default this value is initialized to false in <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>, but it is
overridden by <a href="qgraphicslayout.html">QGraphicsLayout</a> to
return true. This is because <a href="qgraphicslayout.html">QGraphicsLayout</a> is not normally part of
the <a href="qgraphicsitem.html">QGraphicsItem</a> hierarchy, so
the parent layout should delete it. Subclasses might override this
default behaviour by calling setOwnedByLayout(true).</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setOwnedByLayout">setOwnedByLayout</a>().</p>


<h3 class="fn"><a name="parentLayoutItem" /><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> QGraphicsLayoutItem.parentLayoutItem (<i>self</i>)</h3><p>Returns the parent of this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>, or 0 if there
is no parent, or if the parent does not inherit from <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> (<a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> is often used
through multiple inheritance with <a href="qobject.html">QObject</a>-derived classes).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setParentLayoutItem">setParentLayoutItem</a>().</p>


<h3 class="fn"><a name="preferredHeight" />float QGraphicsLayoutItem.preferredHeight (<i>self</i>)</h3><p>Returns the preferred height.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setPreferredHeight">setPreferredHeight</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>


<h3 class="fn"><a name="preferredSize" /><a href="qsizef.html">QSizeF</a> QGraphicsLayoutItem.preferredSize (<i>self</i>)</h3><p>Returns the preferred size.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
<a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(),
<a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(),
<a href="qt.html#SizeHint-enum">Qt.PreferredSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="preferredWidth" />float QGraphicsLayoutItem.preferredWidth (<i>self</i>)</h3><p>Returns the preferred width.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setPreferredWidth">setPreferredWidth</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>


<h3 class="fn"><a name="setGeometry" />QGraphicsLayoutItem.setGeometry (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>rect</i>)</h3><p>This virtual function sets the geometry of the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to <i>rect</i>,
which is in parent coordinates (e.g., the top-left corner of
<i>rect</i> is equivalent to the item's position in parent
coordinates).</p>
<p>You must reimplement this function in a subclass of <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to receive
geometry updates. The layout will call this function when it does a
rearrangement.</p>
<p>If <i>rect</i> is outside of the bounds of minimumSize and
maximumSize, it will be adjusted to its closest size so that it is
within the legal bounds.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#geometry">geometry</a>().</p>


<h3 class="fn"><a name="setGraphicsItem" />QGraphicsLayoutItem.setGraphicsItem (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>item</i>)</h3><p>If the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> represents a
<a href="qgraphicsitem.html">QGraphicsItem</a>, and it wants to
take advantage of the automatic reparenting capabilities of
<a href="qgraphicslayout.html">QGraphicsLayout</a> it should set
this value. Note that if you delete <i>item</i> and not delete the
layout item, you are responsible of calling setGraphicsItem(0) in
order to avoid having a dangling pointer.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#graphicsItem">graphicsItem</a>().</p>


<h3 class="fn"><a name="setMaximumHeight" />QGraphicsLayoutItem.setMaximumHeight (<i>self</i>, float&#160;<i>height</i>)</h3><p>Sets the maximum height to <i>height</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#maximumHeight">maximumHeight</a>(),
<a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and
<a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>


<h3 class="fn"><a name="setMaximumSize" />QGraphicsLayoutItem.setMaximumSize (<i>self</i>, <a href="qsizef.html">QSizeF</a>&#160;<i>size</i>)</h3><p>Sets the maximum size to <i>size</i>. This property overrides
<a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() for
<a href="qt.html#SizeHint-enum">Qt.MaximumSize</a> and ensures
that <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>()
will never return a size larger than <i>size</i>. In order to unset
the maximum size, use an invalid size.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(),
<a href="qt.html#SizeHint-enum">Qt.MaximumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="setMaximumSize-2" />QGraphicsLayoutItem.setMaximumSize (<i>self</i>, float&#160;<i>aw</i>, float&#160;<i>ah</i>)</h3><p>This convenience function is equivalent to calling
setMaximumSize(<a href="qsizef.html">QSizeF</a>(<i>w</i>,
<i>h</i>)).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="setMaximumWidth" />QGraphicsLayoutItem.setMaximumWidth (<i>self</i>, float&#160;<i>width</i>)</h3><p>Sets the maximum width to <i>width</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#maximumWidth">maximumWidth</a>(),
<a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(),
and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>


<h3 class="fn"><a name="setMinimumHeight" />QGraphicsLayoutItem.setMinimumHeight (<i>self</i>, float&#160;<i>height</i>)</h3><p>Sets the minimum height to <i>height</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#minimumHeight">minimumHeight</a>(),
<a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and
<a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>


<h3 class="fn"><a name="setMinimumSize" />QGraphicsLayoutItem.setMinimumSize (<i>self</i>, <a href="qsizef.html">QSizeF</a>&#160;<i>size</i>)</h3><p>Sets the minimum size to <i>size</i>. This property overrides
<a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() for
<a href="qt.html#SizeHint-enum">Qt.MinimumSize</a> and ensures
that <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>()
will never return a size smaller than <i>size</i>. In order to
unset the minimum size, use an invalid size.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(),
<a href="qt.html#SizeHint-enum">Qt.MinimumSize</a>, <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>(), <a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a>(),
and <a href="qgraphicslayoutitem.html#setMinimumHeight">setMinimumHeight</a>().</p>


<h3 class="fn"><a name="setMinimumSize-2" />QGraphicsLayoutItem.setMinimumSize (<i>self</i>, float&#160;<i>aw</i>, float&#160;<i>ah</i>)</h3><p>This convenience function is equivalent to calling
setMinimumSize(<a href="qsizef.html">QSizeF</a>(<i>w</i>,
<i>h</i>)).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="setMinimumWidth" />QGraphicsLayoutItem.setMinimumWidth (<i>self</i>, float&#160;<i>width</i>)</h3><p>Sets the minimum width to <i>width</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#minimumWidth">minimumWidth</a>(),
<a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(),
and <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>


<h3 class="fn"><a name="setOwnedByLayout" />QGraphicsLayoutItem.setOwnedByLayout (<i>self</i>, bool&#160;<i>ownedByLayout</i>)</h3><p>Sets whether a layout should delete this item in its destructor
or not. <i>ownership</i> must be true to in order for the layout to
delete it.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#ownedByLayout">ownedByLayout</a>().</p>


<h3 class="fn"><a name="setParentLayoutItem" />QGraphicsLayoutItem.setParentLayoutItem (<i>self</i>, <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>&#160;<i>parent</i>)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Sets the parent of this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to
<i>parent</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a>().</p>


<h3 class="fn"><a name="setPreferredHeight" />QGraphicsLayoutItem.setPreferredHeight (<i>self</i>, float&#160;<i>height</i>)</h3><p>Sets the preferred height to <i>height</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#preferredHeight">preferredHeight</a>(),
<a href="qgraphicslayoutitem.html#preferredWidth">preferredWidth</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>


<h3 class="fn"><a name="setPreferredSize" />QGraphicsLayoutItem.setPreferredSize (<i>self</i>, <a href="qsizef.html">QSizeF</a>&#160;<i>size</i>)</h3><p>Sets the preferred size to <i>size</i>. This property overrides
<a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() for
<a href="qt.html#SizeHint-enum">Qt.PreferredSize</a> and provides
the default value for <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>().
In order to unset the preferred size, use an invalid size.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(),
<a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(),
<a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(),
<a href="qt.html#SizeHint-enum">Qt.PreferredSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="setPreferredSize-2" />QGraphicsLayoutItem.setPreferredSize (<i>self</i>, float&#160;<i>aw</i>, float&#160;<i>ah</i>)</h3><p>This convenience function is equivalent to calling
setPreferredSize(<a href="qsizef.html">QSizeF</a>(<i>w</i>,
<i>h</i>)).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(),
<a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(),
<a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and
<a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>


<h3 class="fn"><a name="setPreferredWidth" />QGraphicsLayoutItem.setPreferredWidth (<i>self</i>, float&#160;<i>width</i>)</h3><p>Sets the preferred width to <i>width</i>.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#preferredWidth">preferredWidth</a>(),
<a href="qgraphicslayoutitem.html#preferredHeight">preferredHeight</a>(),
<a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(),
and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>


<h3 class="fn"><a name="setSizePolicy" />QGraphicsLayoutItem.setSizePolicy (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a>&#160;<i>policy</i>)</h3><p>Sets the size policy to <i>policy</i>. The size policy describes
how the item should grow horizontally and vertically when arranged
in a layout.</p>
<p><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>'s
default size policy is (<a href="qsizepolicy.html#Policy-enum">QSizePolicy.Fixed</a>, <a href="qsizepolicy.html#Policy-enum">QSizePolicy.Fixed</a>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy.DefaultType</a>),
but it is common for subclasses to change the default. For example,
<a href="qgraphicswidget.html">QGraphicsWidget</a> defaults to
(<a href="qsizepolicy.html#Policy-enum">QSizePolicy.Preferred</a>,
<a href="qsizepolicy.html#Policy-enum">QSizePolicy.Preferred</a>,
<a href="qsizepolicy.html#ControlType-enum">QSizePolicy.DefaultType</a>).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a>() and <a href="qwidget.html#sizePolicy-prop">QWidget.sizePolicy</a>().</p>


<h3 class="fn"><a name="setSizePolicy-2" />QGraphicsLayoutItem.setSizePolicy (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">QSizePolicy.Policy</a>&#160;<i>hPolicy</i>, <a href="qsizepolicy.html#Policy-enum">QSizePolicy.Policy</a>&#160;<i>vPolicy</i>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy.ControlType</a>&#160;<i>controlType</i>&#160;=&#160;QSizePolicy.DefaultType)</h3><p>This is an overloaded function.</p>
<p>This function is equivalent to calling setSizePolicy(<a href="qsizepolicy.html">QSizePolicy</a>(<i>hPolicy</i>, <i>vPolicy</i>,
<i>controlType</i>)).</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a>() and <a href="qwidget.html#sizePolicy-prop">QWidget.sizePolicy</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsizef.html">QSizeF</a> QGraphicsLayoutItem.sizeHint (<i>self</i>, <a href="qt.html#SizeHint-enum">Qt.SizeHint</a>&#160;<i>which</i>, <a href="qsizef.html">QSizeF</a>&#160;<i>constraint</i>&#160;=&#160;QSizeF())</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function returns the size hint for
<i>which</i> of the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>, using the width
or height of <i>constraint</i> to constrain the output.</p>
<p>Reimplement this function in a subclass of <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to provide the
necessary size hints for your items.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>().</p>


<h3 class="fn"><a name="sizePolicy" /><a href="qsizepolicy.html">QSizePolicy</a> QGraphicsLayoutItem.sizePolicy (<i>self</i>)</h3><p>Returns the current size policy.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a>() and
<a href="qwidget.html#sizePolicy-prop">QWidget.sizePolicy</a>().</p>


<h3 class="fn"><a name="updateGeometry" />QGraphicsLayoutItem.updateGeometry (<i>self</i>)</h3><p>This virtual function discards any cached size hint information.
You should always call this function if you change the return value
of the <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>()
function. Subclasses must always call the base implementation when
reimplementing this function.</p>
<p><b>See also</b> <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.12.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt&#160;4.8.7</td></tr></table></div></address></body></html>