Skip to content

Qt6 (QGIS 4) compatibility #1036

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Qt6 (QGIS 4) compatibility #1036

wants to merge 4 commits into from

Conversation

signedav
Copy link
Member

@signedav signedav commented Jun 16, 2025

Qt6 upgrade performed by pyqgis4-checker:

docker run -it --rm -v /home/dave/dev/opengisch/QgisModelBaker:/home/pyqgisdev/ registry.gitlab.com/oslandia/qgis/pyqgis-4-checker/pyqgis-qt-checker:latest pyqt5_to_pyqt6.py --logfile /home/pyqgisdev/pyqt6_checker.log .

See https://github.com/qgis/QGIS/wiki/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6 and https://github.com/qgis/pyqgis4-checker

Requires opengisch/QgisModelBakerLibrary#144

For big parts this resolves #985

Manual checks

Test manually

Docker approach

docker build --pull --rm -f qgis-qt6-unstable.dockerfile     --progress=plain     --build-arg QGIS_GIT_VERSION=master     -t qgis-qt6-unstable:local .

and:

xhost +local:docker

and:

docker run -it --rm   -e DISPLAY=$DISPLAY   -e LC_ALL=C.utf8   -e LANG=C.utf8   -v /tmp/.X11-unix:/tmp/.X11-unix     -v /home/dave/.local/share/QGIS/QGIS3/profiles/modelbaker:/home/quser/.local/share/QGIS/QGIS3/profiles/default qgis-qt6-unstable:local   qgis

with:

-v /home/dave/.local/share/QGIS/QGIS3/profiles/modelbaker:/home/quser/.local/share/QGIS/QGIS3/profiles/default

but does not work

Flatpack approach

Got flatpack from http://duif.net/qgis-qt6.flatpak

And this works...

Results

  • Deprecated FollowREdirectsattribute mode -> could be skipped when Qt6 (but not with Qt5)

  • setFilterRegularExpression replaces setFilterRegExp

  • The gui is f... up. Sizes are not correct. (Test here on the other computer)

  • Could not test Java interaction with flat pack (it says no java is installed)

  • Do we need to support Qt < 5.12? (if so,then we need setFilterRegExp)

signedav added 4 commits June 16, 2025 10:51
docker run -it --rm -v /home/dave/dev/opengisch/QgisModelBaker:/home/pyqgisdev/ registry.gitlab.com/oslandia/qgis/pyqgis-4-checker/pyqgis-qt-checker:latest pyqt5_to_pyqt6.py --logfile /home/pyqgisdev/pyqt6_checker.log .
For big parts this resolves #985
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ensure Qt6 compatibility
2 participants