-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt desktop GUI: upgrade to Qt6 #9189
Conversation
Even though it seems to work, There's a |
related #9189 (version 3.2 added support for qt6, so this version supports both qt5 and qt6)
Thanks, done. At a higher level, what do you think about doing this migration now? :) AFAICS there are no real blockers. |
c8ba60b
to
dfcd010
Compare
It looks fully functional. The only thing I ran into testing the branch was an error when grabbing QR from screen. That was on both wayland and xcb backends. I didn't test the AppImage yet. There might be dependency issues between pyqt6 and debian buster. |
The wayland plugin would require at least debian 12 (or ubuntu 22.04) at runtime. see spesmilo#9189 (review) : > I've now tried running the appimage on debian 10 (oldoldstable), and am getting an error with wayland. > > ``` > 4.16 | D | util.profiler | Plugins.__init__ 0.0422 sec > 4.16 | I | daemon.Daemon | launching GUI: qt > 4.76 | I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=6.7.1, PyQt=6.7.1 > /tmp/.mount_electrFlGFOt/usr/bin/python3: symbol lookup error: /tmp/.mount_electrFlGFOt/usr/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/../../lib/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags > ``` > > If I explicitly specify `QT_QPA_PLATFORM=xcb`, it starts and works as expected. But it picks wayland by default. > I found https://bugreports.qt.io/browse/QTBUG-114635 and it looks like even debian 11 might be affected.
required for qt6 related: spesmilo#6598
due to the qt 5.15 -> qt 6.7 bump related spesmilo#3685
macOS reserves the "About" menu item name, similarly to "Preferences" (see a few lines above). The "About" keyword seems even more strictly locked down: not allowed as either a prefix or a suffix. - With Qt5, a matching menu item is simply auto-recognised as the special "About" item, - but with Qt6, it seems we explicitly have to do this dance, as directly adding a menu item with the "About" name results in a segfault...
Some checkboxes, e.g. main_window.warn_if_testnet became buggy with pyqt6: looks like the stateChanged signal passes an int, not a Qt.CheckState. (and note that Qt.CheckState is an Enum, not an IntEnum). So `x == Qt.CheckState.Checked` would always evaluate to False. ``` def on_cb(_x): print(f"heyheyhey. {_x=!r}, {Qt.CheckState.Checked=!r}, {cb.checkState()=!r}, {cb.isChecked()=!r}") cb = QCheckBox("") cb.stateChanged.connect(on_cb) ``` heyheyhey. x=2, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Checked: 2>, cb.isChecked()=True heyheyhey. x=0, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Unchecked: 0>, cb.isChecked()=False
The wayland plugin would require at least debian 12 (or ubuntu 22.04) at runtime. see spesmilo#9189 (review) : > I've now tried running the appimage on debian 10 (oldoldstable), and am getting an error with wayland. > > ``` > 4.16 | D | util.profiler | Plugins.__init__ 0.0422 sec > 4.16 | I | daemon.Daemon | launching GUI: qt > 4.76 | I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=6.7.1, PyQt=6.7.1 > /tmp/.mount_electrFlGFOt/usr/bin/python3: symbol lookup error: /tmp/.mount_electrFlGFOt/usr/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/../../lib/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags > ``` > > If I explicitly specify `QT_QPA_PLATFORM=xcb`, it starts and works as expected. But it picks wayland by default. > I found https://bugreports.qt.io/browse/QTBUG-114635 and it looks like even debian 11 might be affected.
0fb20cc
to
e8450f0
Compare
I think that functionality is already broken on Linux if wayland is being used as window manager (regardless of the qpa plugin used). It might still work if wayland is not used at all. |
This fixes the pinmatrix dialog (used by trezor one, keepkey, safet), which was previously segfaulting. follow-up #9189
related #9189 (version 3.2 added support for qt6, so this version supports both qt5 and qt6)
This PR migrates the Qt Widgets GUI used on desktop from Qt5 to Qt6.
Notes:
$ QT_QPA_PLATFORM=xcb ./run_electrum
vs$ QT_QPA_PLATFORM=wayland ./run_electrum
>>> window.question(msg="msg")
closes #8007