-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
In my project I have a c++ backend which has instances of QContact. The ui is done in QML. Currently there's no way to create a QDeclarativeContact from c++ and call the setContact() function with the contact instance.
Due to this, the only chance to access a contact from QML is getting the localId's from c++ and search for the contacts again with QDeclarativeContactModel. This seems pretty annoying to me and prevents users from mixing c++ and qml easily.
Another approach to making setContact() invokable would be to provide a factory class to create a QDeclarativeContact from a QContact instance.
Also a Q_INVOKABLE constructor would solve this.