Handling Gtk.StringList changes in Python (original) (raw)

February 5, 2025, 5:23am 1

G’day!

I’m missing a bit of documentation here. Here’s the code:

self._model = Gtk.StringList()
...
self._model.connect("items_changed", self._on_string_list_changed)
...
def _on_string_list_changed(self, instance, foo, bar, baz):
    # foo, bar and baz are integers are passed as integers.
    ...

What are foo, bar and baz here? GTK does complain if I don’t have the right number of parameters.

Many thanks,

J.R.

ebassi (Emmanuele Bassi) February 5, 2025, 11:01am 2

A Gtk.StringList implements Gio.ListModel, so you need to check the documentation for that interface as well.

system (system) Closed March 7, 2025, 11:02am 3

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