[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Qml: Instantiate a model derived from QAbstractListModel from qml.
From: "B. B." <thebbzoo () gmail ! com>
Date: 2014-11-27 13:11:42
Message-ID: CAG_54VBw7HZ50CXyE+9x=dxCt9FFibiKx-aW-_PEo2nwmoCZyA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> 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... :-)
Cheers,
Brian
[Attachment #5 (text/html)]
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <br>
What does work is creating an object with slots that return an<br>
instance of the model. It is not ideal but it is what I use at the<br>
moment.<br>
<span class=""></span></blockquote><div><br><br>You can actually make the instance of \
the model, in the qml ( right now, just not use it directly in the list view ) \
<br>Using your workaround, letting it returns itself through a slot,<br>then you do \
not need any "auxiliary" extra object...<br><br>just to pretify your \
workaround a little.. and at the same time create the model in qml... <br><br>Thanks \
for you tip, I actually always have an "controller" created, so I think \
your workaround<br>will be my prefered method... :-)<br><br>Cheers,<br>Brian <br> \
<br></div></div></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic