2015-05-23 21:20 GMT+04:00 mark diener rpzrpz...@gmail.com:
Hello:
I came across a use case where I wanted to return a QAbstractListModel from
a Q_INVOKABLE in a C++ QObject based class.
The explicit constructor for QAbstractListModel requires a construction of
these classes that forces
On Saturday 23. May 2015 10:20:23 mark diener wrote:
qrc:/main.qml:48: Error: Unknown method return type: MyQAbstractListModel*
You need to call somewhere
qRegisterMetaTypeMyQAbstractListModel*();
Note: This is the mailing list for the developer _of_ Qt. For question
related to Qt usage,
Hello:
I came across a use case where I wanted to return a QAbstractListModel from
a Q_INVOKABLE in a C++ QObject based class.
The explicit constructor for QAbstractListModel requires a construction of
these classes that forces the Q_INVOKABLE to return a pointer to the List
Model instance.
I
2015-05-23 21:51 GMT+04:00 m...@rpzdesign.com m...@rpzdesign.com:
Konstantin:
Maybe you could add some useful guidance to your response.
Sure I could.
The point of interest is that it must be a QObject derived return.
Maybe a pointer to a QObject.
QObject doesn't allow deep-copy, so
Konstantin Olivier:
I though this unknown base type might be missing from the meta compiler
and thus not the framework recognizing AbstractList* but recognizing
many other types.
But there is a RegisterType option to make this all go away.
Lightbulb going off right now
Thanks to you
Konstantin:
Maybe you could add some useful guidance to your response.
The point of interest is that it must be a QObject derived return.
Maybe a pointer to a QObject.
Or maybe there is another way to construct QAbstractListModel that will
allow for a non-pointer return from Q_INVOKABLE?