i tryt to invoke QMetaObject::invokeMethod from object to the caller object
i have this from the object :
bool bReturnInvokeMethod = false;
bool bInvokeMethod1= QMetaObject::invokeMethod(m_pCollector,
"setStack",
Qt::BlockingQueuedConnection,
Q_ARG(QMap<QString,QVector<std::string > >, linksQTResultMap));
but im getting this error:
error C2976: 'QMap' : too few template arguments
why its well defined type
The problem is that the C++ preprocessor isn’t aware of templates, and
Q_ARGis a macro.When the preprocessor sees:
It’s interpreted as a three distinct arguments (quotes to make it more visible):
and the resulting expansion doesn’t make sense.
Something that usually works to counter this is to use a typedef: