Skip to content
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 (gui/qt/, QtWidgets) #8007

Closed
SomberNight opened this issue Oct 8, 2022 · 8 comments · Fixed by #9189
Closed

Qt desktop GUI: upgrade to Qt6 (gui/qt/, QtWidgets) #8007

SomberNight opened this issue Oct 8, 2022 · 8 comments · Fixed by #9189

Comments

@SomberNight
Copy link
Member

SomberNight commented Oct 8, 2022

Opening this issue to discuss if it is time to upgrade to Qt6, for the desktop Qt GUI.

Qt5 is not getting any more updates.
The latest Qt version atm is 6.4. Qt6.2 was an LTS version, so I expect Qt6 is mature now.

Just like pyqt5, pyqt6 is also available on PyPI, from the same maintainer.

There is the question of compatibility with OSes:

@SomberNight
Copy link
Member Author

SomberNight commented Oct 8, 2022

As long as debian stable, and the latest ubuntu LTS do not have packages, I think it is too early to upgrade to Qt6.

(which I guess means we will wait until ubuntu 24.04?)

@accumulator
Copy link
Member

accumulator commented Oct 8, 2022

As Electrum-QML is only targeting android, not having PyQt6 available in the distro is only an issue for developers. The android build container builds PyQt itself.

Edit: ah yes, I didn't see you are specifically talking about the desktop UI

@SomberNight
Copy link
Member Author

Right, but I think we can upgrade the desktop Qt GUI and the android qml GUI independently.
I am specifically looking at considerations for the desktop Qt GUI here. I'll change the title to clarify.

Re android qml, we are building most components ourselves, so these considerations do not apply.

@SomberNight SomberNight changed the title Qt GUI: upgrade to Qt6 Qt desktop GUI: upgrade to Qt6 Oct 8, 2022
@SomberNight
Copy link
Member Author

SomberNight commented Oct 8, 2022

To be even more clear, I mean this issue is about electrum/gui/qt, the QtWidgets GUI. So I do not mean running the electrum/gui/qml GUI on desktop as part of development.

For linux distro users to be able to run electrum, it matters whether the dependencies are packaged.
Also, if we want electrum itself to be packaged by distros, which I guess is not a priority, but e.g. Tails packages electrum, then again it matters if the deps are available.

@SomberNight SomberNight changed the title Qt desktop GUI: upgrade to Qt6 Qt desktop GUI: upgrade to Qt6 (gui/qt/, QtWidgets) Oct 8, 2022
@accumulator
Copy link
Member

I don't think we currently gain anything by upgrading to Qt6. Unless there are features in Qt6 that we absolutely need, it's probably better to be 'most compatible' with all the LTS distro's out there. Qt6 is only just hitting the latest distribution releases, so it'll be a while still until Qt6 is widely available. In the mean time, most distro's that do ship Qt6 will also have Qt5 co-installable (AFAIK).

@SomberNight
Copy link
Member Author

Yes, I agree. Looks like it's better to wait for now.

@SomberNight
Copy link
Member Author

Note: #8560 is introducing gui/common_qt/, which is used by both gui/qt/ and gui/qml/. common_qt makes it difficult to use different Qt versions in the qml and qt guis.

Note: the qtpy 3rd-party library provides APIs to abstract away Qt5/Qt6. We happen to already depend on qtpy indirectly through qdarkstyle.

Though as long as there is not a lot of code in common_qt, we might simply try-except import from both pyqt5 and pyqt6 at the top of the file.

@accumulator
Copy link
Member

we might simply try-except import from both pyqt5 and pyqt6 at the top of the file.

This should be sufficient. There's not much common code yet, and what is there is fairly trivial, and shouldn't need version specifics.

@spesmilo spesmilo deleted a comment from arslan-raza-143 Feb 12, 2024
SomberNight added a commit to SomberNight/electrum that referenced this issue Sep 10, 2024
SomberNight added a commit to SomberNight/electrum that referenced this issue Sep 16, 2024
@SomberNight SomberNight modified the milestones: backlog, 4.6.0 Oct 8, 2024
SomberNight added a commit that referenced this issue Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants