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
|
<?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>QChildEvent 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">QChildEvent Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QChildEvent class contains event parameters for child object
events. <a href="#details">More...</a></p>
<p>Inherits <a href="qevent.html">QEvent</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qchildevent.html#QChildEvent">__init__</a></b> (<i>self</i>, QEvent.Type <i>type</i>, QObject <i>child</i>)</li><li><div class="fn" /><b><a href="qchildevent.html#QChildEvent-2">__init__</a></b> (<i>self</i>, QChildEvent)</li><li><div class="fn" />bool <b><a href="qchildevent.html#added">added</a></b> (<i>self</i>)</li><li><div class="fn" />QObject <b><a href="qchildevent.html#child">child</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchildevent.html#polished">polished</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchildevent.html#removed">removed</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QChildEvent class contains event parameters for child object
events.</p>
<p>Child events are sent immediately to objects when children are
added or removed.</p>
<p>In both cases you can only rely on the child being a <a href="qobject.html">QObject</a> (or, if <a href="qobject.html#isWidgetType">QObject.isWidgetType</a>() returns
true, a <a href="qwidget.html">QWidget</a>). This is because in the
<a href="qevent.html#Type-enum">QEvent.ChildAdded</a> case the
child is not yet fully constructed; in the <a href="qevent.html#Type-enum">QEvent.ChildRemoved</a> case it might have
already been destructed.</p>
<p>The handler for these events is <a href="qobject.html#childEvent">QObject.childEvent</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QChildEvent" />QChildEvent.__init__ (<i>self</i>, <a href="qevent.html#Type-enum">QEvent.Type</a> <i>type</i>, <a href="qobject.html">QObject</a> <i>child</i>)</h3><p>Constructs a child event object of a particular <i>type</i> for
the <i>child</i>.</p>
<p><i>type</i> can be <a href="qevent.html#Type-enum">QEvent.ChildAdded</a>, <a href="qevent.html#Type-enum">QEvent.ChildRemoved</a>, <a href="qevent.html#Type-enum">QEvent.ChildPolished</a>, or <a href="qevent.html#Type-enum">QEvent.ChildRemoved</a>.</p>
<p><b>See also</b> <a href="qchildevent.html#child">child</a>().</p>
<h3 class="fn"><a name="QChildEvent-2" />QChildEvent.__init__ (<i>self</i>, <a href="qchildevent.html">QChildEvent</a>)</h3><h3 class="fn"><a name="added" />bool QChildEvent.added (<i>self</i>)</h3><p>Returns true if <a href="qevent.html#type">type</a>() is
<a href="qevent.html#Type-enum">QEvent.ChildAdded</a>; otherwise
returns false.</p>
<h3 class="fn"><a name="child" /><a href="qobject.html">QObject</a> QChildEvent.child (<i>self</i>)</h3><p>Returns the child object that was added or removed.</p>
<h3 class="fn"><a name="polished" />bool QChildEvent.polished (<i>self</i>)</h3><p>Returns true if <a href="qevent.html#type">type</a>() is
<a href="qevent.html#Type-enum">QEvent.ChildPolished</a>;
otherwise returns false.</p>
<h3 class="fn"><a name="removed" />bool QChildEvent.removed (<i>self</i>)</h3><p>Returns true if <a href="qevent.html#type">type</a>() is
<a href="qevent.html#Type-enum">QEvent.ChildRemoved</a>; otherwise
returns false.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.12.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt 4.8.7</td></tr></table></div></address></body></html>
|