How to convert QVariant(CustomType *) to CustomType*
Im passing a map object into QML by using ;
@viever.rootContext()->setContextProperty(.. , ..)@
My map object is ;
@QMap<QString, QVariant> map;
In QML im getting @QVariant(CustomTypeList*)@ by MyMapObject["KEY"]. It is the model for my repeater. It is ok but i have to reach an invokable method (insert Method) in order to manupulate this model object. My question is that how can i reach CustomType's methods from QVariant(CustomType*)?
or any other suggestion?
QVariant variant = QVariant::fromValue(CustomTypeList *object);
CustomTypeList *myVariable = variant.value<CustomTypeList *>();
hmm.. but when i write the typeof my variant object, it will write on log screen "QVariant(CustomObject*)"
The result is