Help with Mx.ItemView in Python



Hi,

I'm using Clutter and Mx in Python using GObject introspection bindings. I've got a Clutter.ListModel full of data, which I'm trying to use with an Mx.ItemView. My problem is that I can't seem to subclass either Mx.ItemFactory or any Clutter.Actor in a way that the ItemView accepts.

If I try to subclass ItemFactory (to use with Mx.ItemView.set_factory), it tells me my object needs to be a GObject derivative. If I try to subclass from GObject, it tells me it's expecting an ItemFactory. I'm probably missing something obvious.

On the other hand, if I try to subclass a Clutter.Actor, use it with Mx.ItemView.set_item_type, and add attribute mappings, I can't seem to get my custom properties into the class. The properties from the parent class make it in, but any I declare in the __gproperties__ attribute of my class just get ignored. It's fine if I subclass straight from GObject, but then it rightfully complains that it's not a derivative of Actor.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]