[Development] QVariant container API
shkodindanil.letmework at gmail.com
Mon Apr 1 12:50:18 CEST 2019
> You can be sure that the conversion from QList<int> to
> will be successful, but the other way around is not given.
> can contain QVariants of different types. I'm curious what is the use
> the feature?
Imagine one could call a Q_INVOKABLE or a slot given QJsonDocument. The
approach is to get parameter type ids, to make deserializations into
QVariant instances and to invoke.
This becomes non-trivial for container types of arbitary element types.
> I think it could be implemented by extending:
> which registers conversion from a container to QSequentialIterable. You
> add the opposite function. That way no binary compatibility would be
> nor major re-factoring would be needed.
That's right. This solution works exactly like you suggest
https://github.com/Skycoder42/QtJsonSerializer . I am seeking for a way of
eliminating a need of registering types and converters.
> Sure, try, you can add me to review :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development