Invokemethod with an argument Qhash < Qstring,Q string> error 2976
Good morning,
I'm trying yo use an invokemethoh, which has three arguments, a QList and two QHash < Qstring,Qstring>.
When i call the first one i have no problem it works properly, but when i'm trying to do the same with the two others arguments i got an error 2976 :' QHash has too few template arguments' .
How can i resolve the problem because i declared the invokemethod properly ? Is it due to the fact that iuset a argument Qhash with two qstring ?
Here my code :
Code:
QMetaObject::invokeMethod(download,
"CopieVarController", Qt
::AutoConnection , Q_RETURN_ARG
(bool, test
),Q_ARG
(QList<EdsDirectoryItemRef>, RAWFolders
), Q_ARG
( QHash <QString,QString> ,fileNamesPano1
));
thanks for your help and time .
Re: Invokemethod with an argument Qhash < Qstring,Q string> error 2976
That vould caused by the Q_ARG macro, macros are bascially "stupid" text replacements.
Try a typedef to the hash and use that as the argument type.
Something like
Code:
typedef QHash<QString, QString> FileNameHash;
Cheers,
_