Skip to content

Draft: Migrate to PySide6

Daniel Martin requested to merge ninjakiwi/openlp:migrate-to-pyside6 into master

After some struggles and investigation with the PyQt6 branch, I have decided to make the following changes.

  1. Abandon attempts to make Wayland work - Use XWayland instead if on a wayland environment. For now at least, wayland does not provide the protocols we require for OpenLP to work (Window positioning, screen capture, and various other bugs, at least on a mutter desktop)
  2. Rather than using PyQt6, move to Qt's official python bindings PySide6 which still allow the old enums (hopefully we get deprecation warnings if I missed any) and also has better documentation. (https://doc.qt.io/qtforpython-6/index.html). I should also note that it's under the same license as Qt (LGPL), I don't prefer any particular license but notably it is different than PyQt's GPL (or commercial).

The only significant difference changing to PySide6 was the runJavascript function does not provide a callback. I changed this to use the event system that was added somewhat recently.

Qt6 uses Wayland by default, so I am forcing the use of xcb on Wayland clients instead.

I've kept the enum changes, even though PySide6 supports the short forms, because I've read they may depreciate in the future.

Edited by Daniel Martin

Merge request reports