File: qmetaobject.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (188 lines) | stat: -rw-r--r-- 40,225 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?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="../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">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)</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)</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)</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)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfConstructor">indexOfConstructor</a></b> (<i>self</i>, str)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a></b> (<i>self</i>, str)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfMethod">indexOfMethod</a></b> (<i>self</i>, str)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfProperty">indexOfProperty</a></b> (<i>self</i>, str)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfSignal">indexOfSignal</a></b> (<i>self</i>, str)</li><li><div class="fn" />int <b><a href="qmetaobject.html#indexOfSlot">indexOfSlot</a></b> (<i>self</i>, str)</li><li><div class="fn" />QMetaMethod <b><a href="qmetaobject.html#method">method</a></b> (<i>self</i>, int)</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)</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, str)</li><li><div class="fn" /><b><a href="qmetaobject.html#connectSlotsByName">connectSlotsByName</a></b> (QObject)</li><li><div class="fn" />object <b><a href="qmetaobject.html#invokeMethod">invokeMethod</a></b> (QObject, str, Qt.ConnectionType, QGenericReturnArgument, 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, str, QGenericReturnArgument, 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, str, Qt.ConnectionType, 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, str, 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)</li><li><div class="fn" />QByteArray <b><a href="qmetaobject.html#normalizedType">normalizedType</a></b> (str)</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</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>
<p>See also <a href="qmetaclassinfo.html">QMetaClassInfo</a>, <a href="qmetaenum.html">QMetaEnum</a>, <a href="qmetamethod.html">QMetaMethod</a>, <a href="qmetaproperty.html">QMetaProperty</a>, <a href="qmetatype.html">QMetaType</a>, and <a href="metaobjects.html">Meta-Object System</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, str)</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>See also <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/classInfo" />
<h3 class="fn"><a name="classInfo" /><a href="qmetaclassinfo.html">QMetaClassInfo</a> QMetaObject.classInfo (<i>self</i>, int)</h3><p>Returns the meta-data for the item of class information with the given <i>index</i>.</p>
<p>Example:</p>
<pre> class MyClass
 {
     Q_OBJECT
     Q_CLASSINFO("author", "Sabrina Schweinsteiger")
     Q_CLASSINFO("url", "http:<span class="comment">//doc.moosesoft.co.uk/1.0/")</span>

 public:
     ...
 };</pre>
<p>See also <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), <a href="qmetaobject.html#classInfoOffset">classInfoOffset</a>(), and <a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/classInfoCount" />
<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>See also <a href="qmetaobject.html#classInfo">classInfo</a>(), <a href="qmetaobject.html#classInfoOffset">classInfoOffset</a>(), and <a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/classInfoOffset" />
<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>See also <a href="qmetaobject.html#classInfo">classInfo</a>(), <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), and <a href="qmetaobject.html#indexOfClassInfo">indexOfClassInfo</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/className" />
<h3 class="fn"><a name="className" />str QMetaObject.className (<i>self</i>)</h3><p>Returns the class name.</p>
<p>See also <a href="qmetaobject.html#superClass">superClass</a>().</p>
<a name="//apple_ref/cpp/clm/QMetaObject/connectSlotsByName" />
<h3 class="fn"><a name="connectSlotsByName" />QMetaObject.connectSlotsByName (<a href="qobject.html">QObject</a>)</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> void on_&lt;object name&gt;_&lt;signal name&gt;(&lt;signal parameters&gt;);</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> void on_button1_clicked();</pre>
<p>See also <a href="qobject.html#objectName-prop">QObject.setObjectName</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/constructor" />
<h3 class="fn"><a name="constructor" /><a href="qmetamethod.html">QMetaMethod</a> QMetaObject.constructor (<i>self</i>, int)</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>See also <a href="qmetaobject.html#constructorCount">constructorCount</a>() and <a href="qmetaobject.html#newInstance">newInstance</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/constructorCount" />
<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>See also <a href="qmetaobject.html#constructor">constructor</a>() and <a href="qmetaobject.html#indexOfConstructor">indexOfConstructor</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/enumerator" />
<h3 class="fn"><a name="enumerator" /><a href="qmetaenum.html">QMetaEnum</a> QMetaObject.enumerator (<i>self</i>, int)</h3><p>Returns the meta-data for the enumerator with the given <i>index</i>.</p>
<p>See also <a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>(), <a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a>(), and <a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/enumeratorCount" />
<h3 class="fn"><a name="enumeratorCount" />int QMetaObject.enumeratorCount (<i>self</i>)</h3><p>Returns the number of enumerators in this class.</p>
<p>See also <a href="qmetaobject.html#enumerator">enumerator</a>(), <a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a>(), and <a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/enumeratorOffset" />
<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>See also <a href="qmetaobject.html#enumerator">enumerator</a>(), <a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>(), and <a href="qmetaobject.html#indexOfEnumerator">indexOfEnumerator</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfClassInfo" />
<h3 class="fn"><a name="indexOfClassInfo" />int QMetaObject.indexOfClassInfo (<i>self</i>, str)</h3><p>Finds class information item <i>name</i> and returns its index; otherwise returns -1.</p>
<p>See also <a href="qmetaobject.html#classInfo">classInfo</a>(), <a href="qmetaobject.html#classInfoCount">classInfoCount</a>(), and <a href="qmetaobject.html#classInfoOffset">classInfoOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfConstructor" />
<h3 class="fn"><a name="indexOfConstructor" />int QMetaObject.indexOfConstructor (<i>self</i>, str)</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>See also <a href="qmetaobject.html#constructor">constructor</a>(), <a href="qmetaobject.html#constructorCount">constructorCount</a>(), and <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfEnumerator" />
<h3 class="fn"><a name="indexOfEnumerator" />int QMetaObject.indexOfEnumerator (<i>self</i>, str)</h3><p>Finds enumerator <i>name</i> and returns its index; otherwise returns -1.</p>
<p>See also <a href="qmetaobject.html#enumerator">enumerator</a>(), <a href="qmetaobject.html#enumeratorCount">enumeratorCount</a>(), and <a href="qmetaobject.html#enumeratorOffset">enumeratorOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfMethod" />
<h3 class="fn"><a name="indexOfMethod" />int QMetaObject.indexOfMethod (<i>self</i>, str)</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>See also <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>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfProperty" />
<h3 class="fn"><a name="indexOfProperty" />int QMetaObject.indexOfProperty (<i>self</i>, str)</h3><p>Finds property <i>name</i> and returns its index; otherwise returns -1.</p>
<p>See also <a href="qmetaobject.html#property">property</a>(), <a href="qmetaobject.html#propertyCount">propertyCount</a>(), and <a href="qmetaobject.html#propertyOffset">propertyOffset</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfSignal" />
<h3 class="fn"><a name="indexOfSignal" />int QMetaObject.indexOfSignal (<i>self</i>, str)</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>See also <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>
<a name="//apple_ref/cpp/instm/QMetaObject/indexOfSlot" />
<h3 class="fn"><a name="indexOfSlot" />int QMetaObject.indexOfSlot (<i>self</i>, str)</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>See also <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>
<a name="//apple_ref/cpp/clm/QMetaObject/invokeMethod" />
<h3 class="fn"><a name="invokeMethod" />object QMetaObject.invokeMethod (<a href="qobject.html">QObject</a>, str, <a href="qt.html#ConnectionType-enum">Qt.ConnectionType</a>, <a href="qgenericreturnargument.html">QGenericReturnArgument</a>, <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> QMetaObject.invokeMethod(pushButton, "animateClick",
                           Qt.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> QMetaObject.invokeMethod: Unable to handle unregistered datatype 'MyType'</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> QString retVal;
 QMetaObject.invokeMethod(obj, "compute", Qt.DirectConnection,
                           Q_RETURN_ARG(QString, retVal),
                           Q_ARG(QString, "sqrt"),
                           Q_ARG(int, 42),
                           Q_ARG(double, 9.7));</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>See also <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>, str, <a href="qgenericreturnargument.html">QGenericReturnArgument</a>, <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>, str, <a href="qt.html#ConnectionType-enum">Qt.ConnectionType</a>, <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>, str, <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>
<a name="//apple_ref/cpp/instm/QMetaObject/method" />
<h3 class="fn"><a name="method" /><a href="qmetamethod.html">QMetaMethod</a> QMetaObject.method (<i>self</i>, int)</h3><p>Returns the meta-data for the method with the given <i>index</i>.</p>
<p>See also <a href="qmetaobject.html#methodCount">methodCount</a>(), <a href="qmetaobject.html#methodOffset">methodOffset</a>(), and <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/methodCount" />
<h3 class="fn"><a name="methodCount" />int QMetaObject.methodCount (<i>self</i>)</h3><p>Returns the number of methods in this class, including the number of properties provided by each base class. These include signals and slots as well as normal member functions.</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> const QMetaObject* metaObject = obj-&gt;metaObject();
 QStringList methods;
 for(int i = metaObject-&gt;methodOffset(); i &lt; metaObject-&gt;methodCount(); ++i)
     methods &lt;&lt; QString.fromLatin1(metaObject-&gt;method(i).signature());</pre>
<p>See also <a href="qmetaobject.html#method">method</a>(), <a href="qmetaobject.html#methodOffset">methodOffset</a>(), and <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/methodOffset" />
<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>See also <a href="qmetaobject.html#method">method</a>(), <a href="qmetaobject.html#methodCount">methodCount</a>(), and <a href="qmetaobject.html#indexOfMethod">indexOfMethod</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/newInstance" />
<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>See also <a href="qmetaobject.html#Q_ARG">Q_ARG</a>() and <a href="qmetaobject.html#constructor">constructor</a>().</p>
<a name="//apple_ref/cpp/clm/QMetaObject/normalizedSignature" />
<h3 class="fn"><a name="normalizedSignature" /><a href="qbytearray.html">QByteArray</a> QMetaObject.normalizedSignature (str)</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>See also <a href="qmetaobject.html#checkConnectArgs">checkConnectArgs</a>() and <a href="qmetaobject.html#normalizedType">normalizedType</a>().</p>
<a name="//apple_ref/cpp/clm/QMetaObject/normalizedType" />
<h3 class="fn"><a name="normalizedType" /><a href="qbytearray.html">QByteArray</a> QMetaObject.normalizedType (str)</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> QByteArray normType = QMetaObject.normalizedType(" int    const  *");
<span class="comment"> // normType is now "const int*"</span></pre>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qmetaobject.html#normalizedSignature">normalizedSignature</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/property" />
<h3 class="fn"><a name="property" /><a href="qmetaproperty.html">QMetaProperty</a> QMetaObject.property (<i>self</i>, int)</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>See also <a href="qmetaobject.html#propertyCount">propertyCount</a>(), <a href="qmetaobject.html#propertyOffset">propertyOffset</a>(), and <a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/propertyCount" />
<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> const QMetaObject* metaObject = obj-&gt;metaObject();
 QStringList properties;
 for(int i = metaObject-&gt;propertyOffset(); i &lt; metaObject-&gt;propertyCount(); ++i)
     properties &lt;&lt; QString.fromLatin1(metaObject-&gt;property(i).name());</pre>
<p>See also <a href="qmetaobject.html#property">property</a>(), <a href="qmetaobject.html#propertyOffset">propertyOffset</a>(), and <a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/propertyOffset" />
<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>See also <a href="qmetaobject.html#property">property</a>(), <a href="qmetaobject.html#propertyCount">propertyCount</a>(), and <a href="qmetaobject.html#indexOfProperty">indexOfProperty</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/superClass" />
<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>See also <a href="qmetaobject.html#className">className</a>().</p>
<a name="//apple_ref/cpp/instm/QMetaObject/userProperty" />
<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>See also <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.7.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> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>