SUMMARY The notifier class's "windowIsBeingCreated" method is wrapped as "windowCreated" in Notifier.sip. The net result is that Python scripts can't properly access or connect to the signal. EXAMPLE CODE: class MyExtension(krita.Extension): def __init__(self, parent): super(MyExtension, self).__init__(parent) krita.Krita.instance().notifier().windowCreated.connect(self._on_window_created) @QtCore.Slot("Window*") def _on_window_created(self, window): do_stuff() EXAMPLE STACKTRACE: Traceback (most recent call last): File "C:\Users\adric\AppData\Roaming\krita\pykrita\krita_unpipe\krita_unpipe.py", line 47, in __init__ notifier.windowCreated.connect(self._on_window_created) TypeError: connect() failed between windowCreated(Window*) and _on_window_created() EXPECTED RESULT Wrapped signals match their C++ naming, and can be connected to Python methods. SOFTWARE/OS VERSIONS Windows: 10.0.18363 Qt Version: 5.12.8
Yes. I can verify. I started looking at this a bit ago with adding a new python API and noticed the SIP was not named right. I imagine it was renamed while it was being developed and the SIP file was just not updated.
I have a PR out to fix this. I also added a new Notifier to tell us when the main window can actually be referenced. You can see the sample extension I wrote to test this out in the PR.
https://invent.kde.org/graphics/krita/-/merge_requests/437