Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 741

python-qt4-doc-4.10.3-3.mga4.noarch.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="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">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&#160;<i>event</i>)</li><li><div class="fn" />QGraphicsProxyWidget <b><a href="qgraphicsproxywidget.html#createProxyForChildWidget">createProxyForChildWidget</a></b> (<i>self</i>, QWidget&#160;<i>child</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragEnterEvent">dragEnterEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragLeaveEvent">dragLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dragMoveEvent">dragMoveEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#dropEvent">dropEvent</a></b> (<i>self</i>, QGraphicsSceneDragDropEvent&#160;<i>event</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#eventFilter">eventFilter</a></b> (<i>self</i>, QObject&#160;<i>object</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>event</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsproxywidget.html#focusNextPrevChild">focusNextPrevChild</a></b> (<i>self</i>, bool&#160;<i>next</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#grabMouseEvent">grabMouseEvent</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hideEvent">hideEvent</a></b> (<i>self</i>, QHideEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverEnterEvent">hoverEnterEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverLeaveEvent">hoverLeaveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#hoverMoveEvent">hoverMoveEvent</a></b> (<i>self</i>, QGraphicsSceneHoverEvent&#160;<i>event</i>)</li><li><div class="fn" />QVariant <b><a href="qgraphicsproxywidget.html#itemChange">itemChange</a></b> (<i>self</i>, QGraphicsItem.GraphicsItemChange&#160;<i>change</i>, QVariant&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QGraphicsSceneMouseEvent&#160;<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&#160;<i>painter</i>, QStyleOptionGraphicsItem&#160;<i>option</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QGraphicsSceneResizeEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRectF&#160;<i>rect</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#setWidget">setWidget</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent&#160;<i>event</i>)</li><li><div class="fn" />QSizeF <b><a href="qgraphicsproxywidget.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" />QRectF <b><a href="qgraphicsproxywidget.html#subWidgetRect">subWidgetRect</a></b> (<i>self</i>, QWidget&#160;<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&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qgraphicsproxywidget.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QGraphicsSceneWheelEvent&#160;<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 &amp; 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">&amp;</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">&gt;</span>addRow(numberLabel<span class="operator">,</span> numberEdit);
 groupBox<span class="operator">-</span><span class="operator">&gt;</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">&amp;</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">&gt;</span><a href="qgraphicsitem.html#isVisible">isVisible</a>();  <span class="comment">// returns true</span>
 proxy<span class="operator">-</span><span class="operator">&gt;</span><a href="qgraphicsitem.html#isVisible">isVisible</a>(); <span class="comment">// also returns true</span>

 edit<span class="operator">-</span><span class="operator">&gt;</span><a href="qgraphicsitem.html#hide">hide</a>();

 edit<span class="operator">-</span><span class="operator">&gt;</span><a href="qgraphicsitem.html#isVisible">isVisible</a>();  <span class="comment">// returns false</span>
 proxy<span class="operator">-</span><span class="operator">&gt;</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>&#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>


<h3 class="fn"><a name="contextMenuEvent" />QGraphicsProxyWidget.contextMenuEvent (<i>self</i>, <a href="qgraphicsscenecontextmenuevent.html">QGraphicsSceneContextMenuEvent</a>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<i>object</i>, <a href="qevent.html">QEvent</a>&#160;<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>&#160;<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&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<i>change</i>, QVariant&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<i>painter</i>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a>&#160;<i>option</i>, <a href="qwidget.html">QWidget</a>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<i>which</i>, <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>


<h3 class="fn"><a name="subWidgetRect" /><a href="qrectf.html">QRectF</a> QGraphicsProxyWidget.subWidgetRect (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<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>&#160;<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>&#160;<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&#160;4.10.3 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> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>