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

Move to Qt6 #1142

Open
vkbo opened this issue Oct 4, 2022 · 8 comments
Open

Move to Qt6 #1142

vkbo opened this issue Oct 4, 2022 · 8 comments
Assignees
Labels
refactoring Request: Code refactoring needed user interface Component: General user interface

Comments

@vkbo
Copy link
Owner

vkbo commented Oct 4, 2022

Qt6 has been out for a while now, and PyQt6 has as well. There are some minor benefits to moving to Qt6, but it is far too early to drop support for Qt5. It should be possible to support both, like was frequently done when Qt went from 4 to 5.

It is not urgent, but starting to cap off older versions of Qt5 may be useful. Some of the infrastructure novelWriter relies on don't support versions older than 5.11.

Depends on #1473

@vkbo vkbo added the user interface Component: General user interface label Oct 4, 2022
@vkbo vkbo added this to the Future Release milestone Oct 4, 2022
@vkbo vkbo self-assigned this Oct 4, 2022
@vkbo
Copy link
Owner Author

vkbo commented Oct 15, 2022

This should wait until PyQt6 is available in Debian. Either on the next major release of Debian Bookworm, or in the Bullseye backports. Currently, it's only available in testing and unstable.

See: https://tracker.debian.org/pkg/pyqt6

@vkbo vkbo added the refactoring Request: Code refactoring needed label Nov 25, 2022
@longqzh
Copy link
Contributor

longqzh commented Mar 26, 2023

I recommend to use abstraction layer for PyQt5/PySide2/PyQt6/PySide6 qtpy which is deleveped by spider-ide. It may make the migration smoothly

@vkbo
Copy link
Owner Author

vkbo commented Mar 26, 2023

I don't want to pull in any new dependencies. I'm trying to get rid of as many as possible.

I don't expect the transition from PyQt5 to PyQt6 to be particularly difficult, and I don't plan to add support for both PyQt and PySide. Although I have considered switching to PySide entirely now that Qt maintains it.

@vkbo vkbo changed the title Add Qt6 support Move to Qt6 Oct 18, 2023
@vkbo
Copy link
Owner Author

vkbo commented Oct 18, 2023

Due to Qt 5.15 having reached end of life in May this year, and there are issues with Wayland and Qt 5, see #1536, I would like to just move to Qt 6 and discontinue Qt 5 support. I propose to do this for release 2.3.

Since most release formats of novelWriter bundle dependencies, I don't see much of an issue switching. The only releases that depend on system packages are the Debian and Ubuntu .deb releases, and Qt 6 + PyQt 6 have been available there for some time now. This may break compatibility with older Ubuntu releases, but that's not enough of an issue to block moving forward.

@vkbo vkbo mentioned this issue Nov 4, 2023
6 tasks
@xahodo
Copy link

xahodo commented Dec 27, 2023

Does Qt6 fix the bugs regarding the scrolling while dragging in a tree view? If so, perhaps it would be helpful to give the move to PyQt6 some more urgency as that would allow for the removal of some workaround code (note: not a coder here, but I remember you needing to implement a workaround in order to achieve the desired behavior).

@vkbo
Copy link
Owner Author

vkbo commented Dec 27, 2023

I don't know when or if they've fixed the drag and drop bugs. I've identified several issues, so I am likely to keep my workarounds in place anyway since they keep breaking stuff and taking years to fix it.

@xahodo
Copy link

xahodo commented Mar 19, 2024

Would it be an idea to implement this switch with version 2.5?

According to this support for Qt 5.15 has ended in May 2023, except for those who pay.

@vkbo
Copy link
Owner Author

vkbo commented Mar 19, 2024

I'm aware. I pointed this out a few comments up. The reason I haven't switched yet is that it will break compatibility with all current Ubuntu LTS releases. I will at least wait until after Ubuntu 24.04 LTS is released, and ideally 24.04.1 which usually comes in July. This is why Qt6 was removed from the 2.4 release milestone. 2.4 is getting close to being ready for beta release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Request: Code refactoring needed user interface Component: General user interface
Projects
None yet
Development

No branches or pull requests

3 participants