This question already has an answer here:
- Python GTK+ widget name 3 answers
How do I get the name of a Gtk.Widget retrieved from a Builder object?
I specifically mean the name seen in Glade (eg: button1
), not the name of the class (GtkWindow
).
This question is exactly the same as this one, but for Python with GObject introspection.
You can't use the
get_name
method inherited fromGtk.Widget
. Instead, you have to use theget_name
method defined inGtk.Buildable
, like this: