> So we started to design our UI > with QML. I liked the design to split business logic into > C++ and UI design into QML and I still like it, but I came across > several blocking issues (some of them are only valid for our application, some > of them are general): > > - Our application has a huge framework of value classes. They cannot (or at > least it does not make sense to) derive from QObject for several reasons. But > subclassing QObject is the requirement to access data from > C++ in QML. So we had our framework of well designed value classes and > cannot use them in QML. There were evaluations to create QObject > wrappers, but no nice solution. So no support for value classes is probably a > show stopper for many projects.
When I started to use QML, every 3 or 4 months I would to think "I should add Value support to QML", but never had time. Now I think "I wish I had added Value support to QML". You can use QVariantMaps or just send your valuetype "through" QML via a QVariant (if its members don't need to be accessed in QML, but just transferred back to C++). Or wrap them in QObject classes. But none of those are very nice solutions. Modern C++ is written with value-types. I wish Qt had more support for them. Tony _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development