>  Using QVariant as an intermediate data structure is not optimal to
read/write your QList<MyStruct>
>  It also prevents from directly using the QList<MyStruct> type to guide
the deserialization. In QBind you do not need to register types at runtime
and you avoid losing data silently (instead you have static_asserts
complaining at compile time).

The whole idea, is to provide (de)serialization mechanism in scenarios,
when one cannot know the type staticaly, but can get it dynamicaly in a
statically typed language. In general one has to provide a void pointer and
type enumeration. But Qt already happens to have rich type information,
while C++ trails a bit. And that is QVariant+QMetaType.

The only thing in cannot do right now is operating on containers. And
that's what I wanted to discuss.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to