Page 4 of 4

Re: Nested "role" possible in Model/View/QML?

PostPosted: Tue May 10, 2016 3:06 pm
by qxorm
the reason we could not access dependant model data via it's Q_INVOKABLE name was due to the fact I had generated the QxEE Model code from Default instead of QxModelService

Great !

EDIT : this article about QML DelegateModelGroup gives me some ideas to improve qx::IxModel base class.
Using QVariantMap as a return value, we could implement a method which return relationships values without using nested models concept (so without using QxEntityEditor model/view generated classes).
Moreover, since all classes registered in QxOrm context can be serialized to JSON, and since JSON is the best friend of Javascript, I think it should be easy to implement something to get/set all datas (and their relationships) in JSON format (on QML side, JSON.parse() and JSON.stringify() could be used to create objects from JSON).

All these features will be implemented in the next version of QxOrm library...