Sophie

Sophie

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

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>QMetaObject 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">QMetaObject Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QMetaObject class contains meta-information about Qt
objects. <a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmetaobject.html#QMetaObject">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmetaobject.html#QMetaObject-2">__init__</a></b> (<i>self</i>, QMetaObject)</li><li><div class="fn" />QMetaClassInfo <b><a href="qmetaobject.html#classInfo">classInfo</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#classInfoCount">classInfoCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#classInfoOffset">classInfoOffset</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetaobject.html#className">className</a></b> (<i>self</i>)</li><li><div class="fn" />QMetaMethod <b><a href="qmetaobject.html#constructor">constructor</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#constructorCount">constructorCount</a></b> (<i>self</i>)</li><li><div class="fn" />QMetaEnum <b><a href="qmetaobject.html#enumerator">enumerator</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#enumeratorCount">enumeratorCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a></b> (<i>self</i>, str&#160;<i>name</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfConstructor">indexOfConstructor</a></b> (<i>self</i>, str&#160;<i>constructor</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a></b> (<i>self</i>, str&#160;<i>name</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfMethod">indexOfMethod</a></b> (<i>self</i>, str&#160;<i>method</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfProperty">indexOfProperty</a></b> (<i>self</i>, str&#160;<i>name</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfSignal">indexOfSignal</a></b> (<i>self</i>, str&#160;<i>signal</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfSlot">indexOfSlot</a></b> (<i>self</i>, str&#160;<i>slot</i>)</li><li><div class="fn" />QMetaMethod <b><a href="qmetaobject.html#method">method</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#methodCount">methodCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#methodOffset">methodOffset</a></b> (<i>self</i>)</li><li><div class="fn" />QObject <b><a href="qmetaobject.html#newInstance">newInstance</a></b> (<i>self</i>, QGenericArgument&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</li><li><div class="fn" />QMetaProperty <b><a href="qmetaobject.html#property">property</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#propertyCount">propertyCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmetaobject.html#propertyOffset">propertyOffset</a></b> (<i>self</i>)</li><li><div class="fn" />QMetaObject <b><a href="qmetaobject.html#superClass">superClass</a></b> (<i>self</i>)</li><li><div class="fn" />QMetaProperty <b><a href="qmetaobject.html#userProperty">userProperty</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />bool <b><a href="qmetaobject.html#checkConnectArgs">checkConnectArgs</a></b> (str&#160;<i>signal</i>, str&#160;<i>method</i>)</li><li><div class="fn" /><b><a href="qmetaobject.html#connectSlotsByName">connectSlotsByName</a></b> (QObject&#160;<i>o</i>)</li><li><div class="fn" />object <b><a href="qmetaobject.html#invokeMethod">invokeMethod</a></b> (QObject&#160;<i>obj</i>, str&#160;<i>member</i>, Qt.ConnectionType&#160;<i>type</i>, QGenericReturnArgument&#160;<i>ret</i>, QGenericArgument&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</li><li><div class="fn" />object <b><a href="qmetaobject.html#invokeMethod-2">invokeMethod</a></b> (QObject&#160;<i>obj</i>, str&#160;<i>member</i>, QGenericReturnArgument&#160;<i>ret</i>, QGenericArgument&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</li><li><div class="fn" />object <b><a href="qmetaobject.html#invokeMethod-3">invokeMethod</a></b> (QObject&#160;<i>obj</i>, str&#160;<i>member</i>, Qt.ConnectionType&#160;<i>type</i>, QGenericArgument&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</li><li><div class="fn" />object <b><a href="qmetaobject.html#invokeMethod-4">invokeMethod</a></b> (QObject&#160;<i>obj</i>, str&#160;<i>member</i>, QGenericArgument&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), QGenericArgument&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</li><li><div class="fn" />QByteArray <b><a href="qmetaobject.html#normalizedSignature">normalizedSignature</a></b> (str&#160;<i>method</i>)</li><li><div class="fn" />QByteArray <b><a href="qmetaobject.html#normalizedType">normalizedType</a></b> (str&#160;<i>type</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMetaObject class contains meta-information about Qt
objects.</p>
<p>The Qt <a href="metaobjects.html#meta-object-system">Meta-Object
System</a> in Qt is responsible for the signals and slots
inter-object communication mechanism, runtime type information, and
the Qt property system. A single QMetaObject instance is created
for each <a href="qobject.html">QObject</a> subclass that is used
in an application, and this instance stores all the
meta-information for the <a href="qobject.html">QObject</a>
subclass. This object is available as <a href="qobject.html#metaObject">QObject.metaObject</a>().</p>
<p>This class is not normally required for application programming,
but it is useful if you write meta-applications, such as scripting
engines or GUI builders.</p>
<p>The functions you are most likely to find useful are these:</p>
<ul>
<li><a href="qmetaobject.html#className">className</a>() returns
the name of a class.</li>
<li><a href="qmetaobject.html#superClass">superClass</a>() returns
the superclass's meta-object.</li>
<li><a href="qmetaobject.html#method">method</a>() and <a href="qmetaobject.html#methodCount">methodCount</a>() provide
information about a class's meta-methods (signals, slots and other
<a href="qobject.html#Q_INVOKABLE">invokable</a> member
functions).</li>
<li><a href="qmetaobject.html#enumerator">enumerator</a>() and
<a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>()
and provide information about a class's enumerators.</li>
<li><a href="qmetaobject.html#propertyCount">propertyCount</a>()
and <a href="qmetaobject.html#property">property</a>() provide
information about a class's properties.</li>
<li><a href="qmetaobject.html#constructor">constructor</a>() and
<a href="qmetaobject.html#constructorCount">constructorCount</a>()
provide information about a class's meta-constructors.</li>
</ul>
<p>The index functions <a href="qmetaobject.html#indexOfConstructor">indexOfConstructor</a>(),
<a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>(),
<a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>(), and
<a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>()
map names of constructors, member functions, enumerators, or
properties to indexes in the meta-object. For example, Qt uses
<a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>()
internally when you connect a signal to a slot.</p>
<p>Classes can also have a list of <i>name</i>--<i>value</i> pairs
of additional class information, stored in <a href="qmetaclassinfo.html">QMetaClassInfo</a> objects. The number of
pairs is returned by <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), single
pairs are returned by <a href="qmetaobject.html#classInfo">classInfo</a>(), and you can search
for pairs with <a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMetaObject" />QMetaObject.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QMetaObject-2" />QMetaObject.__init__ (<i>self</i>, <a href="qmetaobject.html">QMetaObject</a>)</h3><h3 class="fn"><a name="checkConnectArgs" />bool QMetaObject.checkConnectArgs (str&#160;<i>signal</i>, str&#160;<i>method</i>)</h3><p>Returns true if the <i>signal</i> and <i>method</i> arguments
are compatible; otherwise returns false.</p>
<p>Both <i>signal</i> and <i>method</i> are expected to be
normalized.</p>
<p><b>See also</b> <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>


<h3 class="fn"><a name="classInfo" /><a href="qmetaclassinfo.html">QMetaClassInfo</a> QMetaObject.classInfo (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the meta-data for the item of class information with the
given <i>index</i>.</p>
<p>Example:</p>
<pre class="cpp">
 <span class="keyword">class</span> MyClass : <span class="keyword">public</span> <span class="type"><a href="qobject.html">QObject</a></span>
 {
     Q_OBJECT
     Q_CLASSINFO(<span class="string">"author"</span><span class="operator">,</span> <span class="string">"Sabrina Schweinsteiger"</span>)
     Q_CLASSINFO(<span class="string">"url"</span><span class="operator">,</span> <span class="string">"http://doc.moosesoft.co.uk/1.0/"</span>)

 <span class="keyword">public</span>:
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 };
</pre>
<p><b>See also</b> <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), <a href="qmetaobject.html#classInfoOffset">classInfoOffset</a>(), and
<a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>


<h3 class="fn"><a name="classInfoCount" />int QMetaObject.classInfoCount (<i>self</i>)</h3><p>Returns the number of items of class information in this
class.</p>
<p><b>See also</b> <a href="qmetaobject.html#classInfo">classInfo</a>(), <a href="qmetaobject.html#classInfoOffset">classInfoOffset</a>(), and
<a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>


<h3 class="fn"><a name="classInfoOffset" />int QMetaObject.classInfoOffset (<i>self</i>)</h3><p>Returns the class information offset for this class; i.e. the
index position of this class's first class information item.</p>
<p>If the class has no superclasses with class information, the
offset is 0; otherwise the offset is the sum of all the class
information items in the class's superclasses.</p>
<p><b>See also</b> <a href="qmetaobject.html#classInfo">classInfo</a>(), <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), and
<a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>


<h3 class="fn"><a name="className" />str QMetaObject.className (<i>self</i>)</h3><p>Returns the class name.</p>
<p><b>See also</b> <a href="qmetaobject.html#superClass">superClass</a>().</p>


<h3 class="fn"><a name="connectSlotsByName" />QMetaObject.connectSlotsByName (<a href="qobject.html">QObject</a>&#160;<i>o</i>)</h3><p>Searches recursively for all child objects of the given
<i>object</i>, and connects matching signals from them to slots of
<i>object</i> that follow the following form:</p>
<pre class="cpp">
 <span class="type">void</span> on_<span class="operator">&lt;</span>object name<span class="operator">&gt;</span>_<span class="operator">&lt;</span>signal name<span class="operator">&gt;</span>(<span class="operator">&lt;</span>signal parameters<span class="operator">&gt;</span>);
</pre>
<p>Let's assume our object has a child object of type <a href="qpushbutton.html">QPushButton</a> with the <a href="qobject.html#objectName-prop">object name</a> <tt>button1</tt>.
The slot to catch the button's <tt>clicked()</tt> signal would
be:</p>
<pre class="cpp">
 <span class="type">void</span> on_button1_clicked();
</pre>
<p><b>See also</b> <a href="qobject.html#objectName-prop">QObject.setObjectName</a>().</p>


<h3 class="fn"><a name="constructor" /><a href="qmetamethod.html">QMetaMethod</a> QMetaObject.constructor (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the meta-data for the constructor with the given
<i>index</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmetaobject.html#constructorCount">constructorCount</a>() and
<a href="qmetaobject.html#newInstance">newInstance</a>().</p>


<h3 class="fn"><a name="constructorCount" />int QMetaObject.constructorCount (<i>self</i>)</h3><p>Returns the number of constructors in this class.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmetaobject.html#constructor">constructor</a>() and <a href="qmetaobject.html#indexOfConstructor">indexOfConstructor</a>().</p>


<h3 class="fn"><a name="enumerator" /><a href="qmetaenum.html">QMetaEnum</a> QMetaObject.enumerator (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the meta-data for the enumerator with the given
<i>index</i>.</p>
<p><b>See also</b> <a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>(), <a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a>(), and
<a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>().</p>


<h3 class="fn"><a name="enumeratorCount" />int QMetaObject.enumeratorCount (<i>self</i>)</h3><p>Returns the number of enumerators in this class.</p>
<p><b>See also</b> <a href="qmetaobject.html#enumerator">enumerator</a>(), <a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a>(), and
<a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>().</p>


<h3 class="fn"><a name="enumeratorOffset" />int QMetaObject.enumeratorOffset (<i>self</i>)</h3><p>Returns the enumerator offset for this class; i.e. the index
position of this class's first enumerator.</p>
<p>If the class has no superclasses with enumerators, the offset is
0; otherwise the offset is the sum of all the enumerators in the
class's superclasses.</p>
<p><b>See also</b> <a href="qmetaobject.html#enumerator">enumerator</a>(), <a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>(), and
<a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>().</p>


<h3 class="fn"><a name="indexOfClassInfo" />int QMetaObject.indexOfClassInfo (<i>self</i>, str&#160;<i>name</i>)</h3><p>Finds class information item <i>name</i> and returns its index;
otherwise returns -1.</p>
<p><b>See also</b> <a href="qmetaobject.html#classInfo">classInfo</a>(), <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), and
<a href="qmetaobject.html#classInfoOffset">classInfoOffset</a>().</p>


<h3 class="fn"><a name="indexOfConstructor" />int QMetaObject.indexOfConstructor (<i>self</i>, str&#160;<i>constructor</i>)</h3><p>Finds <i>constructor</i> and returns its index; otherwise
returns -1.</p>
<p>Note that the <i>constructor</i> has to be in normalized form,
as returned by <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmetaobject.html#constructor">constructor</a>(), <a href="qmetaobject.html#constructorCount">constructorCount</a>(), and
<a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>


<h3 class="fn"><a name="indexOfEnumerator" />int QMetaObject.indexOfEnumerator (<i>self</i>, str&#160;<i>name</i>)</h3><p>Finds enumerator <i>name</i> and returns its index; otherwise
returns -1.</p>
<p><b>See also</b> <a href="qmetaobject.html#enumerator">enumerator</a>(), <a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>(), and
<a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a>().</p>


<h3 class="fn"><a name="indexOfMethod" />int QMetaObject.indexOfMethod (<i>self</i>, str&#160;<i>method</i>)</h3><p>Finds <i>method</i> and returns its index; otherwise returns
-1.</p>
<p>Note that the <i>method</i> has to be in normalized form, as
returned by <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>
<p><b>See also</b> <a href="qmetaobject.html#method">method</a>(),
<a href="qmetaobject.html#methodCount">methodCount</a>(), <a href="qmetaobject.html#methodOffset">methodOffset</a>(), and <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>


<h3 class="fn"><a name="indexOfProperty" />int QMetaObject.indexOfProperty (<i>self</i>, str&#160;<i>name</i>)</h3><p>Finds property <i>name</i> and returns its index; otherwise
returns -1.</p>
<p><b>See also</b> <a href="qmetaobject.html#property">property</a>(), <a href="qmetaobject.html#propertyCount">propertyCount</a>(), and <a href="qmetaobject.html#propertyOffset">propertyOffset</a>().</p>


<h3 class="fn"><a name="indexOfSignal" />int QMetaObject.indexOfSignal (<i>self</i>, str&#160;<i>signal</i>)</h3><p>Finds <i>signal</i> and returns its index; otherwise returns
-1.</p>
<p>This is the same as <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>(), except that
it will return -1 if the method exists but isn't a signal.</p>
<p>Note that the <i>signal</i> has to be in normalized form, as
returned by <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>
<p><b>See also</b> <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>(), <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>(),
<a href="qmetaobject.html#method">method</a>(), <a href="qmetaobject.html#methodCount">methodCount</a>(), and <a href="qmetaobject.html#methodOffset">methodOffset</a>().</p>


<h3 class="fn"><a name="indexOfSlot" />int QMetaObject.indexOfSlot (<i>self</i>, str&#160;<i>slot</i>)</h3><p>Finds <i>slot</i> and returns its index; otherwise returns
-1.</p>
<p>This is the same as <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>(), except that
it will return -1 if the method exists but isn't a slot.</p>
<p><b>See also</b> <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>(), <a href="qmetaobject.html#method">method</a>(), <a href="qmetaobject.html#methodCount">methodCount</a>(), and <a href="qmetaobject.html#methodOffset">methodOffset</a>().</p>


<h3 class="fn"><a name="invokeMethod" />object QMetaObject.invokeMethod (<a href="qobject.html">QObject</a>&#160;<i>obj</i>, str&#160;<i>member</i>, <a href="qt.html#ConnectionType-enum">Qt.ConnectionType</a>&#160;<i>type</i>, <a href="qgenericreturnargument.html">QGenericReturnArgument</a>&#160;<i>ret</i>, <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</h3><p>Invokes the <i>member</i> (a signal or a slot name) on the
object <i>obj</i>. Returns true if the member could be invoked.
Returns false if there is no such member or the parameters did not
match.</p>
<p>The invocation can be either synchronous or asynchronous,
depending on <i>type</i>:</p>
<ul>
<li>If <i>type</i> is <a href="qt.html#ConnectionType-enum">Qt.DirectConnection</a>, the member
will be invoked immediately.</li>
<li>If <i>type</i> is <a href="qt.html#ConnectionType-enum">Qt.QueuedConnection</a>, a <a href="qevent.html">QEvent</a> will be sent and the member is invoked as
soon as the application enters the main event loop.</li>
<li>If <i>type</i> is <a href="qt.html#ConnectionType-enum">Qt.BlockingQueuedConnection</a>, the
method will be invoked in the same way as for <a href="qt.html#ConnectionType-enum">Qt.QueuedConnection</a>, except that
the current thread will block until the event is delivered. Using
this connection type to communicate between objects in the same
thread will lead to deadlocks.</li>
<li>If <i>type</i> is <a href="qt.html#ConnectionType-enum">Qt.AutoConnection</a>, the member is
invoked synchronously if <i>obj</i> lives in the same thread as the
caller; otherwise it will invoke the member asynchronously.</li>
</ul>
<p>The return value of the <i>member</i> function call is placed in
<i>ret</i>. If the invocation is asynchronous, the return value
cannot be evaluated. You can pass up to ten arguments (<i>val0</i>,
<i>val1</i>, <i>val2</i>, <i>val3</i>, <i>val4</i>, <i>val5</i>,
<i>val6</i>, <i>val7</i>, <i>val8</i>, and <i>val9</i>) to the
<i>member</i> function.</p>
<p><a href="qgenericargument.html">QGenericArgument</a> and
<a href="qgenericreturnargument.html">QGenericReturnArgument</a>
are internal helper classes. Because signals and slots can be
dynamically invoked, you must enclose the arguments using the
<a href="qmetaobject.html#Q_ARG">Q_ARG</a>() and <a href="qmetaobject.html#Q_RETURN_ARG">Q_RETURN_ARG</a>() macros. <a href="qmetaobject.html#Q_ARG">Q_ARG</a>() takes a type name and a const
reference of that type; <a href="qmetaobject.html#Q_RETURN_ARG">Q_RETURN_ARG</a>() takes a type
name and a non-const reference.</p>
<p>You only need to pass the name of the signal or slot to this
function, not the entire signature. For example, to asynchronously
invoke the <a href="qabstractbutton.html#animateClick">animateClick()</a> slot on a
<a href="qpushbutton.html">QPushButton</a>, use the following
code:</p>
<pre class="cpp">
 <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">.</span>invokeMethod(pushButton<span class="operator">,</span> <span class="string">"animateClick"</span><span class="operator">,</span>
                           <span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>QueuedConnection);
</pre>
<p>With asynchronous method invocations, the parameters must be of
types that are known to Qt's meta-object system, because Qt needs
to copy the arguments to store them in an event behind the scenes.
If you try to use a queued connection and get the error message</p>
<pre class="cpp">
 <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">.</span>invokeMethod: Unable to handle unregistered datatype <span class="char">'MyType'</span>
</pre>
<p>call <a href="qmetatype.html#qRegisterMetaType">qRegisterMetaType</a>() to
register the data type before you call invokeMethod().</p>
<p>To synchronously invoke the <tt>compute(QString, int,
double)</tt> slot on some arbitrary object <tt>obj</tt> retrieve
its return value:</p>
<pre class="cpp">
 <span class="type"><a href="qstring.html">QString</a></span> retVal;
 <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">.</span>invokeMethod(obj<span class="operator">,</span> <span class="string">"compute"</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>DirectConnection<span class="operator">,</span>
                           Q_RETURN_ARG(<span class="type"><a href="qstring.html">QString</a></span><span class="operator">,</span> retVal)<span class="operator">,</span>
                           Q_ARG(<span class="type"><a href="qstring.html">QString</a></span><span class="operator">,</span> <span class="string">"sqrt"</span>)<span class="operator">,</span>
                           Q_ARG(<span class="type">int</span><span class="operator">,</span> <span class="number">42</span>)<span class="operator">,</span>
                           Q_ARG(<span class="type">double</span><span class="operator">,</span> <span class="number">9.7</span>));
</pre>
<p>If the "compute" slot does not take exactly one <a href="qstring.html">QString</a>, one int and one double in the specified
order, the call will fail.</p>
<p><b>See also</b> <a href="qmetaobject.html#Q_ARG">Q_ARG</a>(),
<a href="qmetaobject.html#Q_RETURN_ARG">Q_RETURN_ARG</a>(),
<a href="qmetatype.html#qRegisterMetaType">qRegisterMetaType</a>(),
and <a href="qmetamethod.html#invoke">QMetaMethod.invoke</a>().</p>


<h3 class="fn"><a name="invokeMethod-2" />object QMetaObject.invokeMethod (<a href="qobject.html">QObject</a>&#160;<i>obj</i>, str&#160;<i>member</i>, <a href="qgenericreturnargument.html">QGenericReturnArgument</a>&#160;<i>ret</i>, <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</h3><p>This function overloads <a href="qmetaobject.html#invokeMethod">invokeMethod</a>().</p>
<p>This overload always invokes the member using the connection
type <a href="qt.html#ConnectionType-enum">Qt.AutoConnection</a>.</p>


<h3 class="fn"><a name="invokeMethod-3" />object QMetaObject.invokeMethod (<a href="qobject.html">QObject</a>&#160;<i>obj</i>, str&#160;<i>member</i>, <a href="qt.html#ConnectionType-enum">Qt.ConnectionType</a>&#160;<i>type</i>, <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</h3><p>This function overloads <a href="qmetaobject.html#invokeMethod">invokeMethod</a>().</p>
<p>This overload can be used if the return value of the member is
of no interest.</p>


<h3 class="fn"><a name="invokeMethod-4" />object QMetaObject.invokeMethod (<a href="qobject.html">QObject</a>&#160;<i>obj</i>, str&#160;<i>member</i>, <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</h3><p>This function overloads <a href="qmetaobject.html#invokeMethod">invokeMethod</a>().</p>
<p>This overload invokes the member using the connection type
<a href="qt.html#ConnectionType-enum">Qt.AutoConnection</a> and
ignores return values.</p>


<h3 class="fn"><a name="method" /><a href="qmetamethod.html">QMetaMethod</a> QMetaObject.method (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the meta-data for the method with the given
<i>index</i>.</p>
<p><b>See also</b> <a href="qmetaobject.html#methodCount">methodCount</a>(), <a href="qmetaobject.html#methodOffset">methodOffset</a>(), and <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>().</p>


<h3 class="fn"><a name="methodCount" />int QMetaObject.methodCount (<i>self</i>)</h3><p>Returns the number of methods known to the meta-object system in
this class, including the number of properties provided by each
base class. These include signals and slots as well as member
functions declared with the <a href="qobject.html#Q_INVOKABLE">Q_INVOKABLE</a> macro.</p>
<p>Use code like the following to obtain a <a href="qstringlist.html">QStringList</a> containing the methods specific
to a given class:</p>
<pre class="cpp">
 <span class="keyword">const</span> <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">*</span> metaObject <span class="operator">=</span> obj<span class="operator">-</span><span class="operator">&gt;</span>metaObject();
 <span class="type"><a href="qstringlist.html">QStringList</a></span> methods;
 <span class="keyword">for</span>(<span class="type">int</span> i <span class="operator">=</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>methodOffset(); i <span class="operator">&lt;</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>methodCount(); <span class="operator">+</span><span class="operator">+</span>i)
     methods <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">.</span>fromLatin1(metaObject<span class="operator">-</span><span class="operator">&gt;</span>method(i)<span class="operator">.</span>signature());
</pre>
<p><b>See also</b> <a href="qmetaobject.html#method">method</a>(),
<a href="qmetaobject.html#methodOffset">methodOffset</a>(), and
<a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>().</p>


<h3 class="fn"><a name="methodOffset" />int QMetaObject.methodOffset (<i>self</i>)</h3><p>Returns the method offset for this class; i.e. the index
position of this class's first member function.</p>
<p>The offset is the sum of all the methods in the class's
superclasses (which is always positive since <a href="qobject.html">QObject</a> has the deleteLater() slot and a
destroyed() signal).</p>
<p><b>See also</b> <a href="qmetaobject.html#method">method</a>(),
<a href="qmetaobject.html#methodCount">methodCount</a>(), and
<a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>().</p>


<h3 class="fn"><a name="newInstance" /><a href="qobject.html">QObject</a> QMetaObject.newInstance (<i>self</i>, <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value0</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value1</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value2</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value3</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value4</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value5</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value6</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value7</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value8</i>&#160;=&#160;QGenericArgument(0,0), <a href="qgenericargument.html">QGenericArgument</a>&#160;<i>value9</i>&#160;=&#160;QGenericArgument(0,0))</h3><p>Constructs a new instance of this class. You can pass up to ten
arguments (<i>val0</i>, <i>val1</i>, <i>val2</i>, <i>val3</i>,
<i>val4</i>, <i>val5</i>, <i>val6</i>, <i>val7</i>, <i>val8</i>,
and <i>val9</i>) to the constructor. Returns the new object, or 0
if no suitable constructor is available.</p>
<p>Note that only constructors that are declared with the <a href="qobject.html#Q_INVOKABLE">Q_INVOKABLE</a> modifier are made
available through the meta-object system.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmetaobject.html#Q_ARG">Q_ARG</a>() and
<a href="qmetaobject.html#constructor">constructor</a>().</p>


<h3 class="fn"><a name="normalizedSignature" /><a href="qbytearray.html">QByteArray</a> QMetaObject.normalizedSignature (str&#160;<i>method</i>)</h3><p>Normalizes the signature of the given <i>method</i>.</p>
<p>Qt uses normalized signatures to decide whether two given
signals and slots are compatible. Normalization reduces whitespace
to a minimum, moves 'const' to the front where appropriate, removes
'const' from value types and replaces const references with
values.</p>
<p><b>See also</b> <a href="qmetaobject.html#checkConnectArgs">checkConnectArgs</a>() and
<a href="qmetaobject.html#normalizedType">normalizedType</a>().</p>


<h3 class="fn"><a name="normalizedType" /><a href="qbytearray.html">QByteArray</a> QMetaObject.normalizedType (str&#160;<i>type</i>)</h3><p>Normalizes a <i>type</i>.</p>
<p>See <a href="qmetaobject.html#normalizedSignature">QMetaObject.normalizedSignature</a>()
for a description on how Qt normalizes.</p>
<p>Example:</p>
<pre class="cpp">
 <span class="type"><a href="qbytearray.html">QByteArray</a></span> normType <span class="operator">=</span> <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">.</span>normalizedType(<span class="string">" int    const  *"</span>);
 <span class="comment">// normType is now "const int*"</span>
</pre>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>


<h3 class="fn"><a name="property" /><a href="qmetaproperty.html">QMetaProperty</a> QMetaObject.property (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the meta-data for the property with the given
<i>index</i>. If no such property exists, a null <a href="qmetaproperty.html">QMetaProperty</a> is returned.</p>
<p><b>See also</b> <a href="qmetaobject.html#propertyCount">propertyCount</a>(), <a href="qmetaobject.html#propertyOffset">propertyOffset</a>(), and
<a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>().</p>


<h3 class="fn"><a name="propertyCount" />int QMetaObject.propertyCount (<i>self</i>)</h3><p>Returns the number of properties in this class, including the
number of properties provided by each base class.</p>
<p>Use code like the following to obtain a <a href="qstringlist.html">QStringList</a> containing the properties
specific to a given class:</p>
<pre class="cpp">
 <span class="keyword">const</span> <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">*</span> metaObject <span class="operator">=</span> obj<span class="operator">-</span><span class="operator">&gt;</span>metaObject();
 <span class="type"><a href="qstringlist.html">QStringList</a></span> properties;
 <span class="keyword">for</span>(<span class="type">int</span> i <span class="operator">=</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>propertyOffset(); i <span class="operator">&lt;</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>propertyCount(); <span class="operator">+</span><span class="operator">+</span>i)
     properties <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="type"><a href="qstring.html">QString</a></span><span class="operator">.</span>fromLatin1(metaObject<span class="operator">-</span><span class="operator">&gt;</span>property(i)<span class="operator">.</span>name());
</pre>
<p><b>See also</b> <a href="qmetaobject.html#property">property</a>(), <a href="qmetaobject.html#propertyOffset">propertyOffset</a>(), and
<a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>().</p>


<h3 class="fn"><a name="propertyOffset" />int QMetaObject.propertyOffset (<i>self</i>)</h3><p>Returns the property offset for this class; i.e. the index
position of this class's first property.</p>
<p>The offset is the sum of all the properties in the class's
superclasses (which is always positive since <a href="qobject.html">QObject</a> has the name() property).</p>
<p><b>See also</b> <a href="qmetaobject.html#property">property</a>(), <a href="qmetaobject.html#propertyCount">propertyCount</a>(), and <a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>().</p>


<h3 class="fn"><a name="superClass" /><a href="qmetaobject.html">QMetaObject</a> QMetaObject.superClass (<i>self</i>)</h3><p>Returns the meta-object of the superclass, or 0 if there is no
such object.</p>
<p><b>See also</b> <a href="qmetaobject.html#className">className</a>().</p>


<h3 class="fn"><a name="userProperty" /><a href="qmetaproperty.html">QMetaProperty</a> QMetaObject.userProperty (<i>self</i>)</h3><p>Returns the property that has the <tt>USER</tt> flag set to
true.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qmetaproperty.html#isUser">QMetaProperty.isUser</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>