From 11314c996f16aaaddfd9b7ed8d4aa545af8b091a Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Wed, 28 Feb 2018 16:01:07 +0300 Subject: [PATCH] Updated Plugin migration to QGIS 3 (markdown) --- Plugin-migration-to-QGIS-3.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Plugin-migration-to-QGIS-3.md b/Plugin-migration-to-QGIS-3.md index 53a3178..ae62433 100644 --- a/Plugin-migration-to-QGIS-3.md +++ b/Plugin-migration-to-QGIS-3.md @@ -12,6 +12,8 @@ In QGIS 3, GeoPackage is much more present. Avoid creating shapefile in your plu - [git checkout the source tree](https://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html#toc9) and run QGIS/scripts/2to3 (https://github.com/qgis/QGIS/blob/master/scripts/2to3) on your plugin - `path/to/QGIS/scripts/2to3 /path/to/your/plugin` - This command will print the diff. If you want to write these changes to files, use `-w` + - The script will automatically update from Py2 to Py3, from Qt4 to the correct PyQt version. For instance `from PyQt4.QtGui import QMainWindow` will become `from qgis.PyQt.QtWidgets import QMainWindow`. + - The script will update some QGIS API changes. - have a good look at: https://qgis.org/api/api_break.html - make sure you do python3 and Qt5 ! - tweak and fix until it works :-)