falko.wiese
5th February 2013, 17:11
Hi guys,
it's pretty tough to implement a generic interface to invoke different methods, since those methods have different parameter lists. Maybe I misunderstood the QMetaMethod::invoke() interface ... Actually, I do something as follows:
QList parameters;
...
bool success = method.invoke(receiver, Qt::AutoConnection, Q_RETURN_ARG(...), parameters.at(0), parameters.at(1), ...);
What I want to do is:
...
bool success = method.invoke(..., parameters);
Is something comparable possible?
Thanks for your time,
Falko.
it's pretty tough to implement a generic interface to invoke different methods, since those methods have different parameter lists. Maybe I misunderstood the QMetaMethod::invoke() interface ... Actually, I do something as follows:
QList parameters;
...
bool success = method.invoke(receiver, Qt::AutoConnection, Q_RETURN_ARG(...), parameters.at(0), parameters.at(1), ...);
What I want to do is:
...
bool success = method.invoke(..., parameters);
Is something comparable possible?
Thanks for your time,
Falko.