Sophie

Sophie

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

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>QMetaMethod 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">QMetaMethod Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QMetaMethod class provides meta-data about a member
function. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmetamethod.html#Access-enum">Access</a></b> { Private, Protected, Public }</li><li><div class="fn" />enum <b><a href="qmetamethod.html#MethodType-enum">MethodType</a></b> { Method, Signal, Slot, Constructor }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmetamethod.html#QMetaMethod">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmetamethod.html#QMetaMethod-2">__init__</a></b> (<i>self</i>, QMetaMethod)</li><li><div class="fn" />Access <b><a href="qmetamethod.html#access">access</a></b> (<i>self</i>)</li><li><div class="fn" />object <b><a href="qmetamethod.html#invoke">invoke</a></b> (<i>self</i>, QObject&#160;<i>object</i>, Qt.ConnectionType&#160;<i>connectionType</i>, QGenericReturnArgument&#160;<i>returnValue</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="qmetamethod.html#invoke-2">invoke</a></b> (<i>self</i>, QObject&#160;<i>object</i>, QGenericReturnArgument&#160;<i>returnValue</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="qmetamethod.html#invoke-3">invoke</a></b> (<i>self</i>, QObject&#160;<i>object</i>, Qt.ConnectionType&#160;<i>connectionType</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="qmetamethod.html#invoke-4">invoke</a></b> (<i>self</i>, QObject&#160;<i>object</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" />int <b><a href="qmetamethod.html#methodIndex">methodIndex</a></b> (<i>self</i>)</li><li><div class="fn" />MethodType <b><a href="qmetamethod.html#methodType">methodType</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QByteArray <b><a href="qmetamethod.html#parameterNames">parameterNames</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QByteArray <b><a href="qmetamethod.html#parameterTypes">parameterTypes</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetamethod.html#signature">signature</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetamethod.html#tag">tag</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qmetamethod.html#typeName">typeName</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMetaMethod class provides meta-data about a member
function.</p>
<p>A QMetaMethod has a <a href="qmetamethod.html#methodType">methodType</a>(), a <a href="qmetamethod.html#signature">signature</a>(), a list of <a href="qmetamethod.html#parameterTypes">parameterTypes</a>() and <a href="qmetamethod.html#parameterNames">parameterNames</a>(), a return
<a href="qmetamethod.html#typeName">typeName</a>(), a <a href="qmetamethod.html#tag">tag</a>(), and an <a href="qmetamethod.html#access">access</a>() specifier. You can use
<a href="qmetamethod.html#invoke">invoke</a>() to invoke the method
on an arbitrary <a href="qobject.html">QObject</a>.</p>
<p>A method will only be registered with the meta-object system if
it is a slot, a signal, or declared with the <a href="qobject.html#Q_INVOKABLE">Q_INVOKABLE</a> macro. Constructors can
also be registered with <a href="qobject.html#Q_INVOKABLE">Q_INVOKABLE</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Access-enum" />QMetaMethod.Access</h3><p>This enum describes the access level of a method, following the
conventions used in C++.</p>
<table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Private</tt></td>
<td class="topAlign"><tt>0</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Protected</tt></td>
<td class="topAlign"><tt>1</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Public</tt></td>
<td class="topAlign"><tt>2</tt></td>
</tr>
</table>


<h3 class="fn"><a name="MethodType-enum" />QMetaMethod.MethodType</h3><table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Method</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The function is a plain member function.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Signal</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The function is a signal.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Slot</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The function is a slot.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMetaMethod.Constructor</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The function is a constructor.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMetaMethod" />QMetaMethod.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QMetaMethod-2" />QMetaMethod.__init__ (<i>self</i>, <a href="qmetamethod.html">QMetaMethod</a>)</h3><h3 class="fn"><a name="access" /><a href="qmetamethod.html#Access-enum">Access</a> QMetaMethod.access (<i>self</i>)</h3><p>Returns the access specification of this method (private,
protected, or public).</p>
<p>Signals are always protected, meaning that you can only emit
them from the class or from a subclass.</p>
<p><b>See also</b> <a href="qmetamethod.html#methodType">methodType</a>().</p>


<h3 class="fn"><a name="invoke" />object QMetaMethod.invoke (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>, <a href="qt.html#ConnectionType-enum">Qt.ConnectionType</a>&#160;<i>connectionType</i>, <a href="qgenericreturnargument.html">QGenericReturnArgument</a>&#160;<i>returnValue</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 this method on the object <i>object</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 the <i>connectionType</i>:</p>
<ul>
<li>If <i>connectionType</i> is <a href="qt.html#ConnectionType-enum">Qt.DirectConnection</a>, the member
will be invoked immediately.</li>
<li>If <i>connectionType</i> is <a href="qt.html#ConnectionType-enum">Qt.QueuedConnection</a>, a <a href="qevent.html">QEvent</a> will be posted and the member is invoked
as soon as the application enters the main event loop.</li>
<li>If <i>connectionType</i> is <a href="qt.html#ConnectionType-enum">Qt.AutoConnection</a>, the member is
invoked synchronously if <i>object</i> lives in the same thread as
the caller; otherwise it will invoke the member
asynchronously.</li>
</ul>
<p>The return value of this method call is placed in
<i>returnValue</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 this method call.</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>To asynchronously invoke the <a href="qabstractbutton.html#animateClick">animateClick()</a> slot on a
<a href="qpushbutton.html">QPushButton</a>:</p>
<pre class="cpp">
 <span class="type">int</span> methodIndex <span class="operator">=</span> pushButton<span class="operator">-</span><span class="operator">&gt;</span>metaObject()<span class="operator">-</span><span class="operator">&gt;</span>indexOfMethod(<span class="string">"animateClick()"</span>);
 <span class="type"><a href="qmetamethod.html">QMetaMethod</a></span> method <span class="operator">=</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>method(methodIndex);
 method<span class="operator">.</span>invoke(pushButton<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="qmetamethod.html">QMetaMethod</a></span><span class="operator">.</span>invoke: 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 QMetaMethod.invoke().</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="qbytearray.html">QByteArray</a></span> normalizedSignature <span class="operator">=</span> <span class="type"><a href="qmetaobject.html">QMetaObject</a></span><span class="operator">.</span>normalizedSignature(<span class="string">"compute(QString, int, double)"</span>);
 <span class="type">int</span> methodIndex <span class="operator">=</span> obj<span class="operator">-</span><span class="operator">&gt;</span>metaObject()<span class="operator">-</span><span class="operator">&gt;</span>indexOfMethod(normalizedSignature);
 <span class="type"><a href="qmetamethod.html">QMetaMethod</a></span> method <span class="operator">=</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>method(methodIndex);
 method<span class="operator">.</span>invoke(obj<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><a href="qmetaobject.html#normalizedSignature">QMetaObject.normalizedSignature</a>()
is used here to ensure that the format of the signature is what
invoke() expects. E.g. extra whitespace is removed.</p>
<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>Warning:</b> this method will not test the validity of the
arguments: <i>object</i> must be an instance of the class of the
<a href="qmetaobject.html">QMetaObject</a> of which this <a href="qmetamethod.html">QMetaMethod</a> has been constructed with. The
arguments must have the same type as the ones expected by the
method, else, the behaviour is undefined.</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="qmetaobject.html#invokeMethod">QMetaObject.invokeMethod</a>().</p>


<h3 class="fn"><a name="invoke-2" />object QMetaMethod.invoke (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>, <a href="qgenericreturnargument.html">QGenericReturnArgument</a>&#160;<i>returnValue</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="qmetamethod.html#invoke">invoke</a>().</p>
<p>This overload always invokes this method using the connection
type <a href="qt.html#ConnectionType-enum">Qt.AutoConnection</a>.</p>


<h3 class="fn"><a name="invoke-3" />object QMetaMethod.invoke (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>, <a href="qt.html#ConnectionType-enum">Qt.ConnectionType</a>&#160;<i>connectionType</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="qmetamethod.html#invoke">invoke</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="invoke-4" />object QMetaMethod.invoke (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>object</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="qmetamethod.html#invoke">invoke</a>().</p>
<p>This overload invokes this method using the connection type
<a href="qt.html#ConnectionType-enum">Qt.AutoConnection</a> and
ignores return values.</p>


<h3 class="fn"><a name="methodIndex" />int QMetaMethod.methodIndex (<i>self</i>)</h3><p>Returns this method's index.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="methodType" /><a href="qmetamethod.html#MethodType-enum">MethodType</a> QMetaMethod.methodType (<i>self</i>)</h3><p>Returns the type of this method (signal, slot, or method).</p>
<p><b>See also</b> <a href="qmetamethod.html#access">access</a>().</p>


<h3 class="fn"><a name="parameterNames" />list-of-QByteArray QMetaMethod.parameterNames (<i>self</i>)</h3><p>Returns a list of parameter names.</p>
<p><b>See also</b> <a href="qmetamethod.html#parameterTypes">parameterTypes</a>() and <a href="qmetamethod.html#signature">signature</a>().</p>


<h3 class="fn"><a name="parameterTypes" />list-of-QByteArray QMetaMethod.parameterTypes (<i>self</i>)</h3><p>Returns a list of parameter types.</p>
<p><b>See also</b> <a href="qmetamethod.html#parameterNames">parameterNames</a>() and <a href="qmetamethod.html#signature">signature</a>().</p>


<h3 class="fn"><a name="signature" />str QMetaMethod.signature (<i>self</i>)</h3><p>Returns the signature of this method (e.g.,
<tt>setValue(double)</tt>).</p>
<p><b>See also</b> <a href="qmetamethod.html#parameterTypes">parameterTypes</a>() and <a href="qmetamethod.html#parameterNames">parameterNames</a>().</p>


<h3 class="fn"><a name="tag" />str QMetaMethod.tag (<i>self</i>)</h3><p>Returns the tag associated with this method.</p>
<p>Tags are special macros recognized by <tt>moc</tt> that make it
possible to add extra information about a method.</p>
<p>Tag information can be added in the following way in the
function declaration:</p>
<pre class="cpp">
 <span class="preprocessor">#define THISISTESTTAG // tag text</span>
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="keyword">private</span> <span class="keyword">slots</span>:
     THISISTESTTAG <span class="type">void</span> testFunc();
</pre>
<p>and the information can be accessed by using:</p>
<pre class="cpp">
 MainWindow win;
 win<span class="operator">.</span>show();

 <span class="type">int</span> functionIndex <span class="operator">=</span> win<span class="operator">.</span>metaObject()<span class="operator">-</span><span class="operator">&gt;</span>indexOfSlot(<span class="string">"testFunc()"</span>);
 <span class="type"><a href="qmetamethod.html">QMetaMethod</a></span> mm <span class="operator">=</span> metaObject()<span class="operator">-</span><span class="operator">&gt;</span>method(functionIndex);
 <a href="qtcore.html#qDebug">qDebug</a>() <span class="operator">&lt;</span><span class="operator">&lt;</span> mm<span class="operator">.</span>tag(); <span class="comment">// prints THISISTESTTAG</span>
</pre>
<p>For the moment, <tt>moc</tt> doesn't support any special
tags.</p>


<h3 class="fn"><a name="typeName" />str QMetaMethod.typeName (<i>self</i>)</h3><p>Returns the return type of this method, or an empty string if
the return type is <i>void</i>.</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>