Usage of QMetaMethod::invoke(...)
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.
Re: Usage of QMetaMethod::invoke(...)
Does the method accept a list or do you want to simply pass a series of separate arguments as a list?
Re: Usage of QMetaMethod::invoke(...)
Hmm, I assume, I got it ... it isn't so tough, as it seemed before. :)
First of all I initialized the above mentioned parameter list. After that, I can call QMetaMethod::invoke(...) only once in my code with the maximal number of arguments. Most of it are normally initialized with 0. It works that way.
Sorry,
Falko.