From 2e58bf1aa60193bcee89226fb8dc8042c6208c9a Mon Sep 17 00:00:00 2001 From: rvanmaaren <135824777+rvanmaaren@users.noreply.github.com> Date: Fri, 5 Sep 2025 16:01:04 +0200 Subject: [PATCH] Updated Plugin migration to be compatible with Qt5 and Qt6 (markdown) --- Plugin-migration-to-be-compatible-with-Qt5-and-Qt6.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6.md b/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6.md index bf5f977..699ca4b 100644 --- a/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6.md +++ b/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6.md @@ -25,6 +25,17 @@ It's possible to make a plugin for both Qt5 and Qt6. This will get you in the right direction but might not do all necessary changes. Make sure to test your plugin thoroughly. Consider using an IDE with inspection that can notify you about broken imports, bad usage or non-existent references. +### Use OSGeo4W shell +```sh +call "C:\Program Files\QGISQT6 x.xx.x\bin\o4w_env.bat" +call "C:\Program Files\QGISQT6 x.xx.x\bin\qt6_env.bat" +call "C:\Program Files\QGISQT6 x.xx.x\bin\qgis-qt6-bin.env" + +set PYTHONPATH=C:\Program Files\QGISQT6 x.xx.x\apps\qgis-qt6\python;%PYTHONPATH% + +"C:\Program Files\QGISQT6 x.xx.x\apps\Python312\python3.exe" "path/to/pyqt5_to_pyqt6.py" "path/to/plugin" +``` + ### Use Docker image A bundled image with QGIS based on Qt6, including Oracle client and PDAL and the migration script is available: . It can be used like this: