Gtk.WidgetPaintable's __init__ takes no argument (but should)
Gtk.WidgetPaintable
.__init__
should take one argument: A widget. Yet trying to call the constructor results in this error:
File "/app/share/re.sonny.Workbench/gdbus_ext.py", line 319, in on_method_call
result = method_func(obj, *args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/share/re.sonny.Workbench/python-previewer.py", line 149, in screenshot
paintable = Gtk.WidgetPaintable(self.target)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)
This can be worked around using Gtk.WidgetPaintable.new
instead.
Using GTK 4.
Edited by Marco Köpcke