Is there anyway to create a QVariant from a metatype id ?
For example :
int id = qRegisterMetaType<MyStruct>();
QVariant myVariant = QVariant::fromMetaType(id);
So myVariant is now a QVariant containing a default-constructed value of "MyStruct".
I didn't find anyway to do this with the QVariant API, did I miss something, or is there any trick ?
Thanks