Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3f684444755c5ad1181cdd5a97348f3c > files > 1197

PyQt4-devel-4.7.4-2.fc14.i686.rpm

<?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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.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">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&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QGraphicsSceneContextMenuEvent)</li><li><div class="fn" />QGraphicsProxyWidget <b><a href="qgraphicsproxywidget.html#createProxyForChildWidget">createProxyForChildWidget</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragEnterEvent">dragEnterEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragLeaveEvent">dragLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragMoveEvent">dragMoveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dropEvent">dropEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#eventFilter">eventFilter</a></b> (<i>self</i>, QObject, QEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#focusNextPrevChild">focusNextPrevChild</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#grabMouseEvent">grabMouseEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hideEvent">hideEvent</a></b> (<i>self</i>, QHideEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverEnterEvent">hoverEnterEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverLeaveEvent">hoverLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverMoveEvent">hoverMoveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent)</li><li><div class="fn" />QVariant <b><a href="qgraphicsproxywidget.html#itemChange">itemChange</a></b> (<i>self</i>, QGraphicsItem.GraphicsItemChange, QVariant)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent)</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, QStyleOptionGraphicsItem, QWidget)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QGraphicsSceneResizeEvent)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRectF)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#setWidget">setWidget</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent)</li><li><div class="fn" />QSizeF <b><a href="qgraphicsproxywidget.html#sizeHint">sizeHint</a></b> (<i>self</i>, Qt.SizeHint, QSizeF&#160;<i>constraint</i>&#160;=&#160;QSizeF())</li><li><div class="fn" />QRectF <b><a href="qgraphicsproxywidget.html#subWidgetRect">subWidgetRect</a></b> (<i>self</i>, QWidget)</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)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QGraphicsSceneWheelEvent)</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 &amp; Drop, and popups. You can also embed complex widgets, e.g., widgets with subwidgets.</p>
<p>Example:</p>
<pre> int main(int argc, char **argv)
 {
     QApplication app(argc, argv);

     QTabWidget *tabWidget = new QTabWidget;

     QGraphicsScene scene;
     QGraphicsProxyWidget *proxy = scene.addWidget(tabWidget);

     QGraphicsView view(&amp;scene);
     view.show();

     return app.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 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> QGroupBox *groupBox = new QGroupBox("Contact Details");
 QLabel *numberLabel = new QLabel("Telephone number");
 QLineEdit *numberEdit = new QLineEdit;

 QFormLayout *layout = new QFormLayout;
 layout-&gt;addRow(numberLabel, numberEdit);
 groupBox-&gt;setLayout(layout);

 QGraphicsScene scene;
 QGraphicsProxyWidget *proxy = scene.addWidget(groupBox);

 QGraphicsView view(&amp;scene);
 view.show();</pre>
<p>The image below is the output obtained with its contents margin and contents rect labeled.</p>
<p align="center"><img 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 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> QGraphicsScene scene;

 QLineEdit *edit = new QLineEdit;
 QGraphicsProxyWidget *proxy = scene.addWidget(edit);

 edit-&gt;isVisible();  <span class="comment">// returns true</span>
 proxy-&gt;isVisible(); <span class="comment">// also returns true</span>

 edit-&gt;hide();

 edit-&gt;isVisible();  <span class="comment">// returns false</span>
 proxy-&gt;isVisible(); <span class="comment">// also returns false</span></pre>
<p>QGraphicsProxyWidget maintains symmetry for the following states:</p>
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
<thead><tr class="qt-style" valign="top"><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>
<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>
<p>See also <a href="qgraphicsscene.html#addWidget">QGraphicsScene.addWidget</a>() and <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsProxyWidget" />QGraphicsProxyWidget.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;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>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/~QGraphicsProxyWidget" />
<h3 class="fn"><a name="contextMenuEvent" />QGraphicsProxyWidget.contextMenuEvent (<i>self</i>, <a href="qgraphicsscenecontextmenuevent.html">QGraphicsSceneContextMenuEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#contextMenuEvent">QGraphicsItem.contextMenuEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/createProxyForChildWidget" />
<h3 class="fn"><a name="createProxyForChildWidget" /><a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a> QGraphicsProxyWidget.createProxyForChildWidget (<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>This function makes it possible to aquire 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>See also <a href="qgraphicsproxywidget.html#newProxyWidget">newProxyWidget</a>() and <a href="qgraphicsscene.html#addWidget">QGraphicsScene.addWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/dragEnterEvent" />
<h3 class="fn"><a name="dragEnterEvent" />QGraphicsProxyWidget.dragEnterEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragEnterEvent">QGraphicsItem.dragEnterEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/dragLeaveEvent" />
<h3 class="fn"><a name="dragLeaveEvent" />QGraphicsProxyWidget.dragLeaveEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragLeaveEvent">QGraphicsItem.dragLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/dragMoveEvent" />
<h3 class="fn"><a name="dragMoveEvent" />QGraphicsProxyWidget.dragMoveEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dragMoveEvent">QGraphicsItem.dragMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/dropEvent" />
<h3 class="fn"><a name="dropEvent" />QGraphicsProxyWidget.dropEvent (<i>self</i>, <a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#dropEvent">QGraphicsItem.dropEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/event" />
<h3 class="fn"><a name="event" />bool QGraphicsProxyWidget.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/eventFilter" />
<h3 class="fn"><a name="eventFilter" />bool QGraphicsProxyWidget.eventFilter (<i>self</i>, <a href="qobject.html">QObject</a>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#eventFilter">QObject.eventFilter</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/focusInEvent" />
<h3 class="fn"><a name="focusInEvent" />QGraphicsProxyWidget.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#focusInEvent">QGraphicsItem.focusInEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/focusNextPrevChild" />
<h3 class="fn"><a name="focusNextPrevChild" />bool QGraphicsProxyWidget.focusNextPrevChild (<i>self</i>, bool)</h3><p>Reimplemented from <a href="qgraphicswidget.html#focusNextPrevChild">QGraphicsWidget.focusNextPrevChild</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/focusOutEvent" />
<h3 class="fn"><a name="focusOutEvent" />QGraphicsProxyWidget.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#focusOutEvent">QGraphicsItem.focusOutEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/grabMouseEvent" />
<h3 class="fn"><a name="grabMouseEvent" />QGraphicsProxyWidget.grabMouseEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#grabMouseEvent">QGraphicsWidget.grabMouseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/hideEvent" />
<h3 class="fn"><a name="hideEvent" />QGraphicsProxyWidget.hideEvent (<i>self</i>, <a href="qhideevent.html">QHideEvent</a>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#hideEvent">QGraphicsWidget.hideEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/hoverEnterEvent" />
<h3 class="fn"><a name="hoverEnterEvent" />QGraphicsProxyWidget.hoverEnterEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverEnterEvent">QGraphicsItem.hoverEnterEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/hoverLeaveEvent" />
<h3 class="fn"><a name="hoverLeaveEvent" />QGraphicsProxyWidget.hoverLeaveEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverLeaveEvent">QGraphicsItem.hoverLeaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/hoverMoveEvent" />
<h3 class="fn"><a name="hoverMoveEvent" />QGraphicsProxyWidget.hoverMoveEvent (<i>self</i>, <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#hoverMoveEvent">QGraphicsItem.hoverMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/itemChange" />
<h3 class="fn"><a name="itemChange" />QVariant QGraphicsProxyWidget.itemChange (<i>self</i>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">QGraphicsItem.GraphicsItemChange</a>, QVariant)</h3><p>Reimplemented from <a href="qgraphicsitem.html#itemChange">QGraphicsItem.itemChange</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/keyPressEvent" />
<h3 class="fn"><a name="keyPressEvent" />QGraphicsProxyWidget.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#keyPressEvent">QGraphicsItem.keyPressEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/keyReleaseEvent" />
<h3 class="fn"><a name="keyReleaseEvent" />QGraphicsProxyWidget.keyReleaseEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#keyReleaseEvent">QGraphicsItem.keyReleaseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/mouseDoubleClickEvent" />
<h3 class="fn"><a name="mouseDoubleClickEvent" />QGraphicsProxyWidget.mouseDoubleClickEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseDoubleClickEvent">QGraphicsItem.mouseDoubleClickEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/mouseMoveEvent" />
<h3 class="fn"><a name="mouseMoveEvent" />QGraphicsProxyWidget.mouseMoveEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseMoveEvent">QGraphicsItem.mouseMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/mousePressEvent" />
<h3 class="fn"><a name="mousePressEvent" />QGraphicsProxyWidget.mousePressEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mousePressEvent">QGraphicsItem.mousePressEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/mouseReleaseEvent" />
<h3 class="fn"><a name="mouseReleaseEvent" />QGraphicsProxyWidget.mouseReleaseEvent (<i>self</i>, <a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#mouseReleaseEvent">QGraphicsItem.mouseReleaseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/newProxyWidget" />
<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>See also <a href="qgraphicsproxywidget.html#createProxyForChildWidget">createProxyForChildWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/paint" />
<h3 class="fn"><a name="paint" />QGraphicsProxyWidget.paint (<i>self</i>, <a href="qpainter.html">QPainter</a>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a>, <a href="qwidget.html">QWidget</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem.paint</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/resizeEvent" />
<h3 class="fn"><a name="resizeEvent" />QGraphicsProxyWidget.resizeEvent (<i>self</i>, <a href="qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#resizeEvent">QGraphicsWidget.resizeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/setGeometry" />
<h3 class="fn"><a name="setGeometry" />QGraphicsProxyWidget.setGeometry (<i>self</i>, <a href="qrectf.html">QRectF</a>)</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#setGeometry">QGraphicsLayoutItem.setGeometry</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/setWidget" />
<h3 class="fn"><a name="setWidget" />QGraphicsProxyWidget.setWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</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>See also <a href="qgraphicsproxywidget.html#widget">widget</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/showEvent" />
<h3 class="fn"><a name="showEvent" />QGraphicsProxyWidget.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#showEvent">QGraphicsWidget.showEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/sizeHint" />
<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>, <a href="qsizef.html">QSizeF</a>&#160;<i>constraint</i>&#160;=&#160;QSizeF())</h3><p>Reimplemented from <a href="qgraphicslayoutitem.html#sizeHint">QGraphicsLayoutItem.sizeHint</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/subWidgetRect" />
<h3 class="fn"><a name="subWidgetRect" /><a href="qrectf.html">QRectF</a> QGraphicsProxyWidget.subWidgetRect (<i>self</i>, <a href="qwidget.html">QWidget</a>)</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>See also <a href="qgraphicsproxywidget.html#widget">widget</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/type" />
<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>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/ungrabMouseEvent" />
<h3 class="fn"><a name="ungrabMouseEvent" />QGraphicsProxyWidget.ungrabMouseEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qgraphicswidget.html#ungrabMouseEvent">QGraphicsWidget.ungrabMouseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/wheelEvent" />
<h3 class="fn"><a name="wheelEvent" />QGraphicsProxyWidget.wheelEvent (<i>self</i>, <a href="qgraphicsscenewheelevent.html">QGraphicsSceneWheelEvent</a>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#wheelEvent">QGraphicsItem.wheelEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QGraphicsProxyWidget/widget" />
<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>See also <a href="qgraphicsproxywidget.html#setWidget">setWidget</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.4 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.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>