[Development] Q_INVOKABLE QAbstractListModel

Konstantin Ritt ritt.ks at gmail.com
Sat May 23 19:59:05 CEST 2015


2015-05-23 21:51 GMT+04:00 md at rpzdesign.com <md at 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 yes a pointer to a QObject is expected.


> Or maybe there is another way to construct QAbstractListModel that will
> allow for a non-pointer return from Q_INVOKABLE?
>

It is not about Q_INVOKABLE (which is `#define Q_INVOKABLE`, if you didn't
know).
It is not about constructing something - you're free to construct it
anyhow, here is my bless.


> (But that would be on the stack likely)
>

Just remember to not delete it whilst it is referenced or gets used.


> More comments appreciated,
>

Read the docs. No more comments plz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150523/7eed1ba0/attachment.html>


More information about the Development mailing list