qgis / QGIS-Enhancement-Proposals

QEP's (QGIS Enhancement Proposals) are used in the process of creating and discussing new enhancements for QGIS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support building QGIS application on Qt 6

nyalldawson opened this issue · comments

QGIS Enhancement: Support building QGIS app on Qt 6

Date 2022/01/20

Author Nyall Dawson (@nyalldawson)

Contact nyall dot dawson at gmail dot com

Version <= QGIS 3.28

Summary

QGIS is heavily dependent on the Qt library. Almost every part of QGIS utilises the Qt library!

Currently, QGIS builds are only supported on version 5 of the Qt libraries. Upstream Qt library maintainers have effectively end-of-life'd Qt 5, and only support the newer Qt 6 version.

Some work was done on a voluntary basis during 2021 to allow QGIS to build under the Qt6 library. This voluntary work added support for building the "core" and "analysis" components of QGIS. Support was added to QGIS' CI (continous integration) testing suite on github so that every pull request triggers a build of the core and analysis libraries on Qt 6, preventing any new work from breaking compatibility with Qt 6. Additionally, a number of the existing core and analysis unit tests are also run on the Qt 6 builds. These tests account for roughly 1/3 of the core/analysis unit tests -- the rest are failing under Qt 6 only for reasons currently unknown.

Remaining components which currently cannot be built on Qt6 are the "gui", "app", "3d" and "server" components. This grant proposal covers porting the "gui" and "app" components to Qt6 compatibility, which is the minimum subset of QGIS required to allow the QGIS application to run and be user testable. (The "server", "3d" and python components of QGIS will not be targeted in this project)

(Note that for the foreseeable future QGIS will only be officially supported under the Qt5 environment. This work is being undertaken to prepare QGIS for future officially supported Qt6 builds.)

Importance of work

As noted above, upstream Qt maintainers have declared Qt 5 as "end of life". We no longer receive bug fixes or security fixes for Qt 5, and this directly affects the quality and stability of QGIS itself. Bugs in the Qt library directly affect QGIS, and by restricting QGIS to version of Qt which is no longer supported we have no official means of addressing these issues.

As a result, it is critical that QGIS is prepared for an eventual transition to Qt 6.

Scope of work

This grant project includes the following concrete deliverables:

  • Adding support for Qt6 builds of the "GUI" library, including building the associated gui unit tests
  • Adding support for Qt6 builds of the "app" library, including building the associated app unit tests
  • Extending the current Qt6 tests on the github CI (continuous integration testing environment) so that the gui and app libraries are automatically built for all pull requests submitted to QGIS, and all gui/app unit tests which work without changes are also enabled on this CI

The grant project has been costed to allow for 2 weeks developer focus on the Qt 6 builds. Assuming that the above deliverables can be implemented with time remaining, all remaining time will be devoted to tracking down the source of test failures which are occurring only on the Qt 6 builds.

Issue Tracking ID(s)

N/A

Votes

(required)

+1, thanks

Do you have any plan regarding QtWebkit?

@3nids

Do you have any plan regarding QtWebkit?

Leaving it disabled for now.

Thx a lot.

Is there an "easy" way for people to get started helping with this port? I don't see an issue that summarizes/coordinates the outstanding work on the port. Is there a branch where work is being done (I briefly looked, but didn't find one).

@selimnairb

Everything is in the master branch (and the vast majority was in the 3.28 release), so building either of those should give good results on qt6

Hi, I have noticed that qgis native for windows didn't change (winExtras still in code), so it is not possible to build qgis gui till now.

Do you have any time plan on when this can be done?

Thank you so much.

commented

Wondering if there are any instructions on how to build with Qt 6 or if this is even possible/recommended? I'm using Q 3.28.2.

Thanks you very much!

I wonder if the Linux Wayland issues are related to the Qt5 base, so probably quality of life could largely improved by using to Qt6.
We're willing of financially contributing to this support, if it improves the Wayland situation. Can someone explain the "Grant 2022" tag to me? Is it related to supporting specific features like this one?

Do we now if QGIS will be built on QT6 anytime soon?

Hi friends!, is qgis_gui linking with Qt6 in Qgis 3.34 Prizren?

Hi friends!, is qgis_gui linking with Qt6 in Qgis 3.34 Prizren?

No, QGIS 3.34 is still building upon Qt5

Do we now if QGIS will be built on QT6 anytime soon?

It's possible to build QGIS with Qt6, but without Python binding for now. It would be soon possible but there would be still work to be done in order to have a fully QGIS working version with Qt6.