I try to use Qt Script module to trigger some slots in my application for testing purpose and I have a slot which takes a QVector<QVariant> as arguments. My question is how can I send these parameters from the script ?
I tried this script:
Qt Code:
var myArray = ["String", 0]; myObject.mySlot(myArray);To copy to clipboard, switch view to plain text mode
Then my slot gets called but the QVector is empty.
I tried Q_DECLARE_METATYPE(QVector<QVariant>) and qScriptRegisterSequenceMetaType<QVector<QVariant> >(engine) and I can't even compile it. I get this error :
How can I do this ?error C2039: 'qt_metatype_id' : is not a member of 'QMetaTypeId<T>'
with
[
T=QVariant
]
Bookmarks