I tried adding:
Code:
editor.setWindowFlags(QtCore.Qt.Tool)
and tested it on Windows.
Unfortunately, it introduced an unwanted side effect. If I click on the Sigil main window while the plugin window is open, the plugin window disappears and I have no way to bring it back. Since it is a Qt.Tool window, it doesn't have its own taskbar button, so it becomes effectively inaccessible until the plugin is restarted.
With the current implementation, the plugin window has its own taskbar button on Windows, so even if it gets hidden behind Sigil, it can easily be restored.
I'll also test the suggested change on macOS, since I understand the behavior there may be different.
-----
However, if I use
Code:
editor.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
the plugin window remains above all other windows system-wide, even after switching to another application, which is also not the behavior I'm looking for.