I’ve a GObject.Object subclass that declares a list type property. I use __gproperties__ to declare properties:
__gproperties__ = {
"date": (
list,
"date property",
"A property describing the current date",
[],
GObject.ParamFlags.READWRITE
)
}
But it’s showing TypeError: could not get typecode from object. PyGobject documentation says properties can take GTypes or python types which will get converted to a GType.
I’m not sure there is a GType equivalent for tuple…
Personally, if the property is only used on Python side, I just set the type to object.
If you need to interact with other languages or bindings (like for plugins), better use a typed list, like GObject.TYPE_STRV for strings.