return NULL (Gtk4&python)

property_expression =, None, “string”)
return: TypeError: constructor returned NULL

The first argument needs to be a GObject type. G_TYPE_STRING is just the C string type (char *). I think you were looking for Gtk.StringObject.

Unfortunately, this still won’t work unless you have the very latest PyGObject with Fundamental type support (!250) · Merge requests · GNOME / pygobject · GitLab.

For alternatives in the meantime, see:

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.