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?

I don't know about the internals, but I think "list" should be the
correct type. Not knowing what you want to do exactly with the list
and its items, maybe you could move the processing/iterating over the
list into Python land and just expose the result as a single value to
QML? Or if that doesn't work, another idea would be to subclass
QObject and give it slots that provide a list-like API (size(), get(),
...) - yep, that's ugly and might not be the fastest way of doing
things.

Apart from that, maybe opening a bug/feature request at
http://bugs.openbossa.org/ seems like a good idea (post the bug link
here after submitting), as this is something that developers would
expect to work, and if it can be supported from the technical point of
view (Shiboken?), it probably should be.

Thanks,
Thomas
_______________________________________________
PySide mailing list
PySide@lists.openbossa.org
http://lists.openbossa.org/listinfo/pyside

Reply via email to