Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtCore.QMetaMethod Class Reference

The QMetaMethod class provides meta-data about a member function. More...

Inheritance diagram for QtCore.QMetaMethod:
Collaboration diagram for QtCore.QMetaMethod:

Public Types

enum  Access { Private = 0, Protected = 1, Public = 2 }
  More...
 
enum  Attributes { Cloned = 2, Compatibility = 1, Scriptable = 4 }
 
enum  MethodType { Constructor = 3, Method = 0, Signal = 1, Slot = 2 }
 

Public Member Functions

 QMetaMethod ()
 
 QMetaMethod (QMetaMethod copy)
 
virtual void CreateProxy ()
 
new QMetaMethod.Access access ()
 
 
new int attributes ()
 
new QMetaObject EnclosingMetaObject ()
 
new bool Invoke (QObject @object)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue)
 
 
new bool Invoke (QObject @object, QGenericArgument val0)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8)
 
 
new bool Invoke (QObject @object, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8)
 
 
new bool Invoke (QObject @object, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8)
 
 
new bool Invoke (QObject @object, Qt.ConnectionType connectionType, QGenericReturnArgument returnValue, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
 
 
new int MethodIndex ()
 
 
new QMetaMethod.MethodType methodType ()
 
 
new
System.Collections.Generic.List
< QByteArray
ParameterNames ()
 
 
new
System.Collections.Generic.List
< QByteArray
ParameterTypes ()
 
 
new int Revision ()
 
new string Signature ()
 
 
new string Tag ()
 
 
new string TypeName ()
 
 
new void Dispose ()
 

Protected Member Functions

 QMetaMethod (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QMetaMethod class provides meta-data about a member function.

A QMetaMethod has a methodType(), a signature(), a list of parameterTypes() and parameterNames(), a return typeName(), a tag(), and an access() specifier. You can use invoke() to invoke the method on an arbitrary QObject.

A method will only be registered with the meta-object system if it is a slot, a signal, or declared with the Q_INVOKABLE macro. Constructors can also be registered with Q_INVOKABLE.

See also QMetaObject, QMetaEnum, QMetaProperty, and Qt's Property System.

Member Enumeration Documentation

This enum describes the access level of a method, following the conventions used in C++.

Enumerator:
Private 
Protected 
Public 
Enumerator:
Cloned 
Compatibility 
Scriptable 
Enumerator:
Constructor 

The function is a constructor.

Method 

The function is a plain member function.

Signal 

The function is a signal.

Slot 

The function is a slot.

Constructor & Destructor Documentation

QtCore.QMetaMethod.QMetaMethod ( System.Type  dummy)
protected
QtCore.QMetaMethod.QMetaMethod ( )
QtCore.QMetaMethod.QMetaMethod ( QMetaMethod  copy)

Member Function Documentation

new QMetaMethod.Access QtCore.QMetaMethod.access ( )

Returns the access specification of this method (private, protected, or public).

Signals are always protected, meaning that you can only emit them from the class or from a subclass.

See also methodType().

new int QtCore.QMetaMethod.attributes ( )
virtual void QtCore.QMetaMethod.CreateProxy ( )
virtual
new void QtCore.QMetaMethod.Dispose ( )
new QMetaObject QtCore.QMetaMethod.EnclosingMetaObject ( )
new bool QtCore.QMetaMethod.Invoke ( QObject object)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8,
QGenericArgument  val9 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8,
QGenericArgument  val9 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8,
QGenericArgument  val9 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new bool QtCore.QMetaMethod.Invoke ( QObject object,
Qt.ConnectionType  connectionType,
QGenericReturnArgument  returnValue,
QGenericArgument  val0,
QGenericArgument  val1,
QGenericArgument  val2,
QGenericArgument  val3,
QGenericArgument  val4,
QGenericArgument  val5,
QGenericArgument  val6,
QGenericArgument  val7,
QGenericArgument  val8,
QGenericArgument  val9 
)

Invokes this method on the object object. Returns true if the member could be invoked. Returns false if there is no such member or the parameters did not match.

The invocation can be either synchronous or asynchronous, depending on the connectionType:

If connectionType is Qt::DirectConnection, the member will be invoked immediately.

If connectionType is Qt::QueuedConnection, a QEvent will be posted and the member is invoked as soon as the application enters the main event loop.

If connectionType is Qt::AutoConnection, the member is invoked synchronously if object lives in the same thread as the caller; otherwise it will invoke the member asynchronously.

The return value of this method call is placed in returnValue. If the invocation is asynchronous, the return value cannot be evaluated. You can pass up to ten arguments (val0, val1, val2, val3, val4, val5, val6, val7, val8, and val9) to this method call.

QGenericArgument and QGenericReturnArgument are internal helper classes. Because signals and slots can be dynamically invoked, you must enclose the arguments using the Q_ARG() and Q_RETURN_ARG() macros. Q_ARG() takes a type name and a const reference of that type; Q_RETURN_ARG() takes a type name and a non-const reference.

To asynchronously invoke the animateClick() slot on a QPushButton:

int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(pushButton, Qt::QueuedConnection);

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

QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'

call qRegisterMetaType() to register the data type before you call QMetaMethod::invoke().

To synchronously invoke the compute(QString, int, double) slot on some arbitrary object obj retrieve its return value:

QString retVal;

QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");

int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);

QMetaMethod method = metaObject->method(methodIndex);

method.invoke(obj,

Qt::DirectConnection,

Q_RETURN_ARG(QString, retVal),

Q_ARG(QString, "sqrt"),

Q_ARG(int, 42),

Q_ARG(double, 9.7));

QMetaObject::normalizedSignature() is used here to ensure that the format of the signature is what invoke() expects. E.g. extra whitespace is removed.

If the "compute" slot does not take exactly one QString, one int and one double in the specified order, the call will fail.

Warning: this method will not test the validity of the arguments: object must be an instance of the class of the QMetaObject of which this QMetaMethod has been constructed with. The arguments must have the same type as the ones expected by the method, else, the behaviour is undefined.

See also Q_ARG(), Q_RETURN_ARG(), qRegisterMetaType(), and QMetaObject::invokeMethod().

new int QtCore.QMetaMethod.MethodIndex ( )

Returns this method's index.

This function was introduced in Qt 4.6.

new QMetaMethod.MethodType QtCore.QMetaMethod.methodType ( )

Returns the type of this method (signal, slot, or method).

See also access().

new System.Collections.Generic.List<QByteArray> QtCore.QMetaMethod.ParameterNames ( )

Returns a list of parameter names.

See also parameterTypes() and signature().

new System.Collections.Generic.List<QByteArray> QtCore.QMetaMethod.ParameterTypes ( )

Returns a list of parameter types.

See also parameterNames() and signature().

new int QtCore.QMetaMethod.Revision ( )
new string QtCore.QMetaMethod.Signature ( )

Returns the signature of this method (e.g., setValue(double)).

See also parameterTypes() and parameterNames().

new string QtCore.QMetaMethod.Tag ( )

Returns the tag associated with this method.

Tags are special macros recognized by moc that make it possible to add extra information about a method.

Tag information can be added in the following way in the function declaration:

#define THISISTESTTAG // tag text

...

private slots:

THISISTESTTAG void testFunc();

and the information can be accessed by using:

MainWindow win;

win.show();

int functionIndex = win.metaObject()->indexOfSlot("testFunc()");

QMetaMethod mm = metaObject()->method(functionIndex);

qDebug() << mm.tag(); // prints THISISTESTTAG

For the moment, moc doesn't support any special tags.

new string QtCore.QMetaMethod.TypeName ( )

Returns the return type of this method, or an empty string if the return type is void.

Member Data Documentation

SmokeInvocation QtCore.QMetaMethod.interceptor
protected

Property Documentation

virtual System.IntPtr QtCore.QMetaMethod.SmokeObject
getset