mirror of
https://github.com/qgis/QGIS.git
synced 2025-08-12 00:05:41 -04:00
Updated Plugin migration to be compatible with Qt5 and Qt6 (markdown)
parent
08cc6ee8c6
commit
11224c7773
@ -9,3 +9,12 @@ It's possible to make a plugin for both Qt5 and Qt6.
|
|||||||
1. Download the script available on [GitHub](https://github.com/qgis/QGIS/blob/master/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py)
|
1. Download the script available on [GitHub](https://github.com/qgis/QGIS/blob/master/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py)
|
||||||
1. `pyqt5_to_pyqt6.py /path/to/plugin`
|
1. `pyqt5_to_pyqt6.py /path/to/plugin`
|
||||||
1. Edit the `metadata.txt` by adding `supportsQt6=True`
|
1. Edit the `metadata.txt` by adding `supportsQt6=True`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## Official C++ documentation
|
||||||
|
- [Removed Modules in Qt 6.0](https://doc.qt.io/qt-6/whatsnew60.html#removed-modules-in-qt-6-0)
|
||||||
|
- [Porting to Qt 6](https://doc.qt.io/qt-6/portingguide.html)
|
||||||
|
- [Changes to Qt Modules in Qt 6](https://doc.qt.io/qt-6/modulechanges.html)
|
||||||
|
- e.g. [QAction has moved to QtGui](https://doc.qt.io/qt-6/widgets-changes-qt6.html#qaction-qactiongroup)!
|
||||||
|
- [Qt Namespace](https://doc.qt.io/qt-6/qt.html) lists all those enums
|
Loading…
x
Reference in New Issue
Block a user