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
|
<?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>QGraphicsProxyWidget 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">QGraphicsProxyWidget Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsProxyWidget class provides a proxy layer for
embedding a <a href="qwidget.html">QWidget</a> in a <a href="qgraphicsscene.html">QGraphicsScene</a>. <a href="#details">More...</a></p>
<p>Inherits <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#QGraphicsProxyWidget">__init__</a></b> (<i>self</i>, QGraphicsItem <i>parent</i> = None, Qt.WindowFlags <i>flags</i> = 0)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QGraphicsSceneContextMenuEvent <i>event</i>)</li><li><div class="fn" />QGraphicsProxyWidget <b><a href="qgraphicsproxywidget.html#createProxyForChildWidget">createProxyForChildWidget</a></b> (<i>self</i>, QWidget <i>child</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragEnterEvent">dragEnterEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragLeaveEvent">dragLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragMoveEvent">dragMoveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dropEvent">dropEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent <i>event</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#event">event</a></b> (<i>self</i>, QEvent <i>event</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#eventFilter">eventFilter</a></b> (<i>self</i>, QObject <i>object</i>, QEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent <i>event</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#focusNextPrevChild">focusNextPrevChild</a></b> (<i>self</i>, bool <i>next</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#grabMouseEvent">grabMouseEvent</a></b> (<i>self</i>, QEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hideEvent">hideEvent</a></b> (<i>self</i>, QHideEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverEnterEvent">hoverEnterEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverLeaveEvent">hoverLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverMoveEvent">hoverMoveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent <i>event</i>)</li><li><div class="fn" />QVariant <b><a href="qgraphicsproxywidget.html#itemChange">itemChange</a></b> (<i>self</i>, QGraphicsItem.GraphicsItemChange <i>change</i>, QVariant <i>value</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent <i>event</i>)</li><li><div class="fn" />QGraphicsProxyWidget <b><a href="qgraphicsproxywidget.html#newProxyWidget">newProxyWidget</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#paint">paint</a></b> (<i>self</i>, QPainter <i>painter</i>, QStyleOptionGraphicsItem <i>option</i>, QWidget <i>widget</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QGraphicsSceneResizeEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRectF <i>rect</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#setWidget">setWidget</a></b> (<i>self</i>, QWidget <i>widget</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent <i>event</i>)</li><li><div class="fn" />QSizeF <b><a href="qgraphicsproxywidget.html#sizeHint">sizeHint</a></b> (<i>self</i>, Qt.SizeHint <i>which</i>, QSizeF <i>constraint</i> = QSizeF())</li><li><div class="fn" />QRectF <b><a href="qgraphicsproxywidget.html#subWidgetRect">subWidgetRect</a></b> (<i>self</i>, QWidget <i>widget</i>)</li><li><div class="fn" />int <b><a href="qgraphicsproxywidget.html#type">type</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#ungrabMouseEvent">ungrabMouseEvent</a></b> (<i>self</i>, QEvent <i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QGraphicsSceneWheelEvent <i>event</i>)</li><li><div class="fn" />QWidget <b><a href="qgraphicsproxywidget.html#widget">widget</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsProxyWidget class provides a proxy layer for
embedding a <a href="qwidget.html">QWidget</a> in a <a href="qgraphicsscene.html">QGraphicsScene</a>.</p>
<p>QGraphicsProxyWidget embeds <a href="qwidget.html">QWidget</a>-based widgets, for example, a <a href="qpushbutton.html">QPushButton</a>, <a href="qfontcombobox.html">QFontComboBox</a>, or even <a href="qfiledialog.html">QFileDialog</a>, into <a href="qgraphicsscene.html">QGraphicsScene</a>. It forwards events
between the two objects and translates between <a href="qwidget.html">QWidget</a>'s integer-based geometry and <a href="qgraphicswidget.html">QGraphicsWidget</a>'s qreal-based geometry.
QGraphicsProxyWidget supports all core features of <a href="qwidget.html">QWidget</a>, including tab focus, keyboard input,
Drag & Drop, and popups. You can also embed complex widgets,
e.g., widgets with subwidgets.</p>
<p>Example:</p>
<pre class="cpp">
<span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span><span class="operator">*</span>argv)
{
<span class="type"><a href="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
<span class="type"><a href="qtabwidget.html">QTabWidget</a></span> <span class="operator">*</span>tabWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtabwidget.html">QTabWidget</a></span>;
<span class="type"><a href="qgraphicsscene.html">QGraphicsScene</a></span> scene;
<span class="type">QGraphicsProxyWidget</span> <span class="operator">*</span>proxy <span class="operator">=</span> scene<span class="operator">.</span>addWidget(tabWidget);
<span class="type"><a href="qgraphicsview.html">QGraphicsView</a></span> view(<span class="operator">&</span>scene);
view<span class="operator">.</span>show();
<span class="keyword">return</span> app<span class="operator">.</span>exec();
}
</pre>
<p>QGraphicsProxyWidget takes care of automatically embedding popup
children of embedded widgets through creating a child proxy for
each popup. This means that when an embedded <a href="qcombobox.html">QComboBox</a> shows its popup list, a new
QGraphicsProxyWidget is created automatically, embedding the popup,
and positioning it correctly. This only works if the popup is child
of the embedded widget (for example <a href="qtoolbutton.html#setMenu">QToolButton.setMenu</a>() requires the
<a href="qmenu.html">QMenu</a> instance to be child of the <a href="qtoolbutton.html">QToolButton</a>).</p>
<a id="embedding-a-widget-with-qgraphicsproxywidget" name="embedding-a-widget-with-qgraphicsproxywidget" />
<h3>Embedding a Widget with QGraphicsProxyWidget</h3>
<p>There are two ways to embed a widget using QGraphicsProxyWidget.
The most common way is to pass a widget pointer to <a href="qgraphicsscene.html#addWidget">QGraphicsScene.addWidget</a>()
together with any relevant <a href="qt.html#WindowType-enum">Qt.WindowFlags</a>. This function
returns a pointer to a QGraphicsProxyWidget. You can then choose to
reparent or position either the proxy, or the embedded widget
itself.</p>
<p>For example, in the code snippet below, we embed a group box
into the proxy:</p>
<pre class="cpp">
<span class="type"><a href="qgroupbox.html">QGroupBox</a></span> <span class="operator">*</span>groupBox <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qgroupbox.html">QGroupBox</a></span>(<span class="string">"Contact Details"</span>);
<span class="type"><a href="qlabel.html">QLabel</a></span> <span class="operator">*</span>numberLabel <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(<span class="string">"Telephone number"</span>);
<span class="type"><a href="qlineedit.html">QLineEdit</a></span> <span class="operator">*</span>numberEdit <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>;
<span class="type"><a href="qformlayout.html">QFormLayout</a></span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qformlayout.html">QFormLayout</a></span>;
layout<span class="operator">-</span><span class="operator">></span>addRow(numberLabel<span class="operator">,</span> numberEdit);
groupBox<span class="operator">-</span><span class="operator">></span><a href="qgraphicswidget.html#layout-prop">setLayout</a>(layout);
<span class="type"><a href="qgraphicsscene.html">QGraphicsScene</a></span> scene;
<span class="type">QGraphicsProxyWidget</span> <span class="operator">*</span>proxy <span class="operator">=</span> scene<span class="operator">.</span>addWidget(groupBox);
<span class="type"><a href="qgraphicsview.html">QGraphicsView</a></span> view(<span class="operator">&</span>scene);
view<span class="operator">.</span><a href="qgraphicsitem.html#show">show</a>();
</pre>
<p>The image below is the output obtained with its contents margin
and contents rect labeled.</p>
<p class="centerAlign"><img alt="" src="images/qgraphicsproxywidget-embed.png" /></p>
<p>Alternatively, you can start by creating a new
QGraphicsProxyWidget item, and then call <a href="qgraphicsproxywidget.html#setWidget">setWidget</a>() to embed a
<a href="qwidget.html">QWidget</a> later. The <a href="qgraphicsproxywidget.html#widget">widget</a>() function returns a
pointer to the embedded widget. QGraphicsProxyWidget shares
ownership with <a href="qwidget.html">QWidget</a>, so if either of
the two widgets are destroyed, the other widget will be
automatically destroyed as well.</p>
<a id="synchronizing-widget-states" name="synchronizing-widget-states" />
<h3>Synchronizing Widget States</h3>
<p>QGraphicsProxyWidget keeps its state in sync with the embedded
widget. For example, if the proxy is hidden or disabled, the
embedded widget will be hidden or disabled as well, and vice versa.
When the widget is embedded by calling addWidget(),
QGraphicsProxyWidget copies the state from the widget into the
proxy, and after that, the two will stay synchronized where
possible. By default, when you embed a widget into a proxy, both
the widget and the proxy will be visible because a <a href="qgraphicswidget.html">QGraphicsWidget</a> is visible when created
(you do not have to call <a href="qgraphicsitem.html#show">show</a>()). If you explicitly hide the
embedded widget, the proxy will also become invisible.</p>
<p>Example:</p>
<pre class="cpp">
<span class="type"><a href="qgraphicsscene.html">QGraphicsScene</a></span> scene;
<span class="type"><a href="qlineedit.html">QLineEdit</a></span> <span class="operator">*</span>edit <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>;
<span class="type">QGraphicsProxyWidget</span> <span class="operator">*</span>proxy <span class="operator">=</span> scene<span class="operator">.</span>addWidget(edit);
edit<span class="operator">-</span><span class="operator">></span><a href="qgraphicsitem.html#isVisible">isVisible</a>(); <span class="comment">// returns true</span>
proxy<span class="operator">-</span><span class="operator">></span><a href="qgraphicsitem.html#isVisible">isVisible</a>(); <span class="comment">// also returns true</span>
edit<span class="operator">-</span><span class="operator">></span><a href="qgraphicsitem.html#hide">hide</a>();
edit<span class="operator">-</span><span class="operator">></span><a href="qgraphicsitem.html#isVisible">isVisible</a>(); <span class="comment">// returns false</span>
proxy<span class="operator">-</span><span class="operator">></span><a href="qgraphicsitem.html#isVisible">isVisible</a>(); <span class="comment">// also returns false</span>
</pre>
<p>QGraphicsProxyWidget maintains symmetry for the following
states:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th><a href="qwidget.html">QWidget</a> state</th>
<th>QGraphicsProxyWidget state</th>
<th>Notes</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qwidget.html#enabled-prop">QWidget.enabled</a></td>
<td><a href="qgraphicsobject.html#enabled-prop">QGraphicsProxyWidget.enabled</a></td>
<td />
</tr>
<tr class="even" valign="top">
<td><a href="qwidget.html#visible-prop">QWidget.visible</a></td>
<td><a href="qgraphicsobject.html#visible-prop">QGraphicsProxyWidget.visible</a></td>
<td>The explicit state is also symmetric.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qwidget.html#geometry-prop">QWidget.geometry</a></td>
<td><a href="qgraphicswidget.html#geometry-prop">QGraphicsProxyWidget.geometry</a></td>
<td>Geometry is only guaranteed to be symmetric while the embedded
widget is visible.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qwidget.html#layoutDirection-prop">QWidget.layoutDirection</a></td>
<td><a href="qgraphicswidget.html#layoutDirection-prop">QGraphicsProxyWidget.layoutDirection</a></td>
<td />
</tr>
<tr class="odd" valign="top">
<td>QWidget.style</td>
<td>QGraphicsProxyWidget.style</td>
<td />
</tr>
<tr class="even" valign="top">
<td><a href="qwidget.html#palette-prop">QWidget.palette</a></td>
<td><a href="qgraphicswidget.html#palette-prop">QGraphicsProxyWidget.palette</a></td>
<td />
</tr>
<tr class="odd" valign="top">
<td><a href="qwidget.html#font-prop">QWidget.font</a></td>
<td><a href="qgraphicswidget.html#font-prop">QGraphicsProxyWidget.font</a></td>
<td />
</tr>
<tr class="even" valign="top">
<td><a href="qwidget.html#cursor-prop">QWidget.cursor</a></td>
<td>QGraphicsProxyWidget.cursor</td>
<td>The embedded widget overrides the proxy widget cursor. The
proxy cursor changes depending on which embedded subwidget is
currently under the mouse.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>()</td>
<td><a href="qgraphicsproxywidget.html#sizeHint">QGraphicsProxyWidget.sizeHint</a>()</td>
<td>All size hint functionality from the embedded widget is
forwarded by the proxy.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qwidget.html#getContentsMargins">QWidget.getContentsMargins</a>()</td>
<td><a href="qgraphicswidget.html#getContentsMargins">QGraphicsProxyWidget.getContentsMargins</a>()</td>
<td>Updated once by <a href="qgraphicsproxywidget.html#setWidget">setWidget</a>().</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qwidget.html#windowTitle-prop">QWidget.windowTitle</a></td>
<td><a href="qgraphicswidget.html#windowTitle-prop">QGraphicsProxyWidget.windowTitle</a></td>
<td>Updated once by <a href="qgraphicsproxywidget.html#setWidget">setWidget</a>().</td>
</tr>
</table>
<p><b>Note:</b> <a href="qgraphicsscene.html">QGraphicsScene</a>
keeps the embedded widget in a special state that prevents it from
disturbing other widgets (both embedded and not embedded) while the
widget is embedded. In this state, the widget may differ slightly
in behavior from when it is not embedded.</p>
<p><b>Warning:</b> This class is provided for convenience when
bridging QWidgets and QGraphicsItems, it should not be used for
high-performance scenarios.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsProxyWidget" />QGraphicsProxyWidget.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a> <i>parent</i> = None, <a href="qt-windowflags.html">Qt.WindowFlags</a> <i>flags</i> = 0)</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 a new QGraphicsProxy widget. <i>parent</i> and
<i>wFlags</i> are passed to <a href="qgraphicsitem.html">QGraphicsItem</a>'s constructor.</p>
<h3 class="fn"><a name="contextMenuEvent" />QGraphicsProxyWidget.contextMenuEvent (<i>self</i>, <a href="qgraphicsscenecontextmenuevent.html">QGraphicsSceneContextMenuEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#contextMenuEvent">QGraphicsItem.contextMenuEvent</a>().</p>
<h3 class="fn"><a name="createProxyForChildWidget" /><a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a> QGraphicsProxyWidget.createProxyForChildWidget (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>child</i>)</h3><p>Creates a proxy widget for the given <i>child</i> of the widget
contained in this proxy.</p>
<p>This function makes it possible to acquire proxies for non
top-level widgets. For instance, you can embed a dialog, and then
transform only one of its widgets.</p>
<p>If the widget is already embedded, return the existing proxy
widget.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qgraphicsproxywidget.html#newProxyWidget">newProxyWidget</a>() and
<a href="qgraphicsscene.html#addWidget">QGraphicsScene.addWidget</a>().</p>
<h3 class="fn"><a name="dragEnterEvent" />QGraphicsProxyWidget.dragEnterEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragEnterEvent">QGraphicsItem.dragEnterEvent</a>().</p>
<h3 class="fn"><a name="dragLeaveEvent" />QGraphicsProxyWidget.dragLeaveEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragLeaveEvent">QGraphicsItem.dragLeaveEvent</a>().</p>
<h3 class="fn"><a name="dragMoveEvent" />QGraphicsProxyWidget.dragMoveEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragMoveEvent">QGraphicsItem.dragMoveEvent</a>().</p>
<h3 class="fn"><a name="dropEvent" />QGraphicsProxyWidget.dropEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dropEvent">QGraphicsItem.dropEvent</a>().</p>
<h3 class="fn"><a name="event" />bool QGraphicsProxyWidget.event (<i>self</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<h3 class="fn"><a name="eventFilter" />bool QGraphicsProxyWidget.eventFilter (<i>self</i>, <a href="qobject.html">QObject</a> <i>object</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#eventFilter">QObject.eventFilter</a>().</p>
<h3 class="fn"><a name="focusInEvent" />QGraphicsProxyWidget.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#focusInEvent">QGraphicsItem.focusInEvent</a>().</p>
<h3 class="fn"><a name="focusNextPrevChild" />bool QGraphicsProxyWidget.focusNextPrevChild (<i>self</i>, bool <i>next</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#focusNextPrevChild">QGraphicsWidget.focusNextPrevChild</a>().</p>
<h3 class="fn"><a name="focusOutEvent" />QGraphicsProxyWidget.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#focusOutEvent">QGraphicsItem.focusOutEvent</a>().</p>
<h3 class="fn"><a name="grabMouseEvent" />QGraphicsProxyWidget.grabMouseEvent (<i>self</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#grabMouseEvent">QGraphicsWidget.grabMouseEvent</a>().</p>
<h3 class="fn"><a name="hideEvent" />QGraphicsProxyWidget.hideEvent (<i>self</i>, <a href="qhideevent.html">QHideEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#hideEvent">QGraphicsWidget.hideEvent</a>().</p>
<h3 class="fn"><a name="hoverEnterEvent" />QGraphicsProxyWidget.hoverEnterEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverEnterEvent">QGraphicsItem.hoverEnterEvent</a>().</p>
<h3 class="fn"><a name="hoverLeaveEvent" />QGraphicsProxyWidget.hoverLeaveEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverLeaveEvent">QGraphicsItem.hoverLeaveEvent</a>().</p>
<h3 class="fn"><a name="hoverMoveEvent" />QGraphicsProxyWidget.hoverMoveEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverMoveEvent">QGraphicsItem.hoverMoveEvent</a>().</p>
<h3 class="fn"><a name="itemChange" />QVariant QGraphicsProxyWidget.itemChange (<i>self</i>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">QGraphicsItem.GraphicsItemChange</a> <i>change</i>, QVariant <i>value</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#itemChange">QGraphicsItem.itemChange</a>().</p>
<h3 class="fn"><a name="keyPressEvent" />QGraphicsProxyWidget.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#keyPressEvent">QGraphicsItem.keyPressEvent</a>().</p>
<h3 class="fn"><a name="keyReleaseEvent" />QGraphicsProxyWidget.keyReleaseEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#keyReleaseEvent">QGraphicsItem.keyReleaseEvent</a>().</p>
<h3 class="fn"><a name="mouseDoubleClickEvent" />QGraphicsProxyWidget.mouseDoubleClickEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseDoubleClickEvent">QGraphicsItem.mouseDoubleClickEvent</a>().</p>
<h3 class="fn"><a name="mouseMoveEvent" />QGraphicsProxyWidget.mouseMoveEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseMoveEvent">QGraphicsItem.mouseMoveEvent</a>().</p>
<h3 class="fn"><a name="mousePressEvent" />QGraphicsProxyWidget.mousePressEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mousePressEvent">QGraphicsItem.mousePressEvent</a>().</p>
<h3 class="fn"><a name="mouseReleaseEvent" />QGraphicsProxyWidget.mouseReleaseEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseReleaseEvent">QGraphicsItem.mouseReleaseEvent</a>().</p>
<h3 class="fn"><a name="newProxyWidget" /><a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a> QGraphicsProxyWidget.newProxyWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>Creates a proxy widget for the given <i>child</i> of the widget
contained in this proxy.</p>
<p>You should not call this function directly; use <a href="qgraphicsproxywidget.html#createProxyForChildWidget">QGraphicsProxyWidget.createProxyForChildWidget</a>()
instead.</p>
<p>This function is a fake virtual slot that you can reimplement in
your subclass in order to control how new proxy widgets are
created. The default implementation returns a proxy created with
the <a href="qgraphicsproxywidget.html#QGraphicsProxyWidget">QGraphicsProxyWidget</a>()
constructor with this proxy widget as the parent.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qgraphicsproxywidget.html#createProxyForChildWidget">createProxyForChildWidget</a>().</p>
<h3 class="fn"><a name="paint" />QGraphicsProxyWidget.paint (<i>self</i>, <a href="qpainter.html">QPainter</a> <i>painter</i>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a> <i>option</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem.paint</a>().</p>
<h3 class="fn"><a name="resizeEvent" />QGraphicsProxyWidget.resizeEvent (<i>self</i>, <a href="qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#resizeEvent">QGraphicsWidget.resizeEvent</a>().</p>
<h3 class="fn"><a name="setGeometry" />QGraphicsProxyWidget.setGeometry (<i>self</i>, <a href="qrectf.html">QRectF</a> <i>rect</i>)</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#setGeometry">QGraphicsLayoutItem.setGeometry</a>().</p>
<h3 class="fn"><a name="setWidget" />QGraphicsProxyWidget.setWidget (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Embeds <i>widget</i> into this proxy widget. The embedded widget
must reside exclusively either inside or outside of Graphics View.
You cannot embed a widget as long as it is is visible elsewhere in
the UI, at the same time.</p>
<p><i>widget</i> must be a top-level widget whose parent is 0.</p>
<p>When the widget is embedded, its state (e.g., visible, enabled,
geometry, size hints) is copied into the proxy widget. If the
embedded widget is explicitly hidden or disabled, the proxy widget
will become explicitly hidden or disabled after embedding is
complete. The class documentation has a full overview over the
shared state.</p>
<p><a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a>'s
window flags determine whether the widget, after embedding, will be
given window decorations or not.</p>
<p>After this function returns, <a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a> will keep its
state synchronized with that of <i>widget</i> whenever
possible.</p>
<p>If a widget is already embedded by this proxy when this function
is called, that widget will first be automatically unembedded.
Passing 0 for the <i>widget</i> argument will only unembed the
widget, and the ownership of the currently embedded widget will be
passed on to the caller. Every child widget that are embedded will
also be embedded and their proxy widget destroyed.</p>
<p>Note that widgets with the <a href="qt.html#WidgetAttribute-enum">Qt.WA_PaintOnScreen</a> widget
attribute set and widgets that wrap an external application or
controller cannot be embedded. Examples are <a href="qglwidget.html">QGLWidget</a> and <a href="qaxwidget.html">QAxWidget</a>.</p>
<p><b>See also</b> <a href="qgraphicsproxywidget.html#widget">widget</a>().</p>
<h3 class="fn"><a name="showEvent" />QGraphicsProxyWidget.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#showEvent">QGraphicsWidget.showEvent</a>().</p>
<h3 class="fn"><a name="sizeHint" /><a href="qsizef.html">QSizeF</a> QGraphicsProxyWidget.sizeHint (<i>self</i>, <a href="qt.html#SizeHint-enum">Qt.SizeHint</a> <i>which</i>, <a href="qsizef.html">QSizeF</a> <i>constraint</i> = QSizeF())</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#sizeHint">QGraphicsLayoutItem.sizeHint</a>().</p>
<h3 class="fn"><a name="subWidgetRect" /><a href="qrectf.html">QRectF</a> QGraphicsProxyWidget.subWidgetRect (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>)</h3><p>Returns the rectangle for <i>widget</i>, which must be a
descendant of <a href="qgraphicsproxywidget.html#widget">widget</a>(), or <a href="qgraphicsproxywidget.html#widget">widget</a>() itself, in this
proxy item's local coordinates.</p>
<p>If no widget is embedded, <i>widget</i> is 0, or <i>widget</i>
is not a descendant of the embedded widget, this function returns
an empty <a href="qrectf.html">QRectF</a>.</p>
<p><b>See also</b> <a href="qgraphicsproxywidget.html#widget">widget</a>().</p>
<h3 class="fn"><a name="type" />int QGraphicsProxyWidget.type (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#type">QGraphicsItem.type</a>().</p>
<h3 class="fn"><a name="ungrabMouseEvent" />QGraphicsProxyWidget.ungrabMouseEvent (<i>self</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#ungrabMouseEvent">QGraphicsWidget.ungrabMouseEvent</a>().</p>
<h3 class="fn"><a name="wheelEvent" />QGraphicsProxyWidget.wheelEvent (<i>self</i>, <a href="qgraphicsscenewheelevent.html">QGraphicsSceneWheelEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#wheelEvent">QGraphicsItem.wheelEvent</a>().</p>
<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QGraphicsProxyWidget.widget (<i>self</i>)</h3><p>Returns a pointer to the embedded widget.</p>
<p><b>See also</b> <a href="qgraphicsproxywidget.html#setWidget">setWidget</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.9.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.2</td></tr></table></div></address></body></html>
|