Unsolved Is it possible to access user defined properties in a QVariant?
-
Hello everyone. Suppose I have a Q_GADGET Player. I can access its properties through the meta object system (with QMetaObject and QMetaProperty). If I convert Player to a QVariant (using
QVariant var = mp.readOnGadget(&p1);
), do I lose information about the objects properties or is it possible to retrieve them from a QVariant?
Thanks for your time. -
You can just use
var.value<Player>()
to retrieve the underlying object and all its properties -
Thanks @VRonin !