[PyQt] Qml: Instantiate a model derived from QAbstractListModel from qml.

B. B. thebbzoo at gmail.com
Thu Nov 27 13:11:42 GMT 2014

> What does work is creating an object with slots that return an
> instance of the model. It is not ideal but it is what I use at the
> moment.

You can actually make the instance of the model, in the qml ( right now,
just not use it directly in the list view )
Using your workaround, letting it returns itself through a slot,
then you do not need any "auxiliary" extra object...

just to pretify your workaround a little.. and at the same time create the
model in qml...

Thanks for you tip, I actually always have an "controller" created, so I
think your workaround
will be my prefered method...   :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141127/ae8d651d/attachment.html>

More information about the PyQt mailing list