On Wed, Feb 16, 2011 at 5:57 PM, Hugo Parente Lima <hugo.l...@openbossa.org>wrote:
> On Wednesday 16 February 2011 14:09:24 Thomas Perl wrote: > > Hi Luca, > > > > 2011/2/16 Luca Donaggio <donag...@gmail.com>: > > > On Wed, Feb 16, 2011 at 4:43 PM, Thomas Perl <th.p...@gmail.com> > wrote: > > >> Which version of PySide are you using? Also, for me it works when > > >> setting a Python list as context property directly; I haven't tried > > >> with properties on QObjects, though. > > > > > > Sorry, I should have mentioned it in my first post! > > > I'm using PySide 1.0.0~beta5 for Maemo. > > > Unfortunately I can't set the list as a context property, as I need it > > > from within a ListModel. > > > Actually I'm setting it with something like this inside the QObject > > > subclass: > > > > > > myList = Property(list, _myList, notify = changed) > > > > > > Maybe the "list" type is not the correct one? > > Maybe this would help: > > http://lists.openbossa.org/pipermail/pyside/2010-December/001585.html > > -- > Hugo Parente Lima > INdT - Instituto Nokia de Tecnologia > Thanks Hugo, it definetly helps! But... I can't find any documentation about QtDeclarative.ListProperty, are there any example? The PieChart one is nice, but it doesn't really answer one question: I have a python list and its getter method (it would be a read-only property, so I don't need to append anything from QML), how do I use ListProperty to just let QML *read* my property? -- Luca Donaggio
_______________________________________________ PySide mailing list PySide@lists.openbossa.org http://lists.openbossa.org/listinfo/pyside