Anpassung an Qt6, Fehler beim Beenden behoben

This commit is contained in:
Michael Otto
2025-11-13 09:32:22 +01:00
parent 09729cdc60
commit 1eeb31e9ae
3 changed files with 18 additions and 3 deletions

16
main.py
View File

@@ -41,14 +41,26 @@ class Verfahrensgebiet:
""" """
Wird aufgerufen, wenn das Dockwidget geschlossen wird. Setzt den Aktivitätsstatus zurück. Wird aufgerufen, wenn das Dockwidget geschlossen wird. Setzt den Aktivitätsstatus zurück.
""" """
self.dockwidget.closingPlugin.disconnect(self.onClosePlugin) try:
self.dockwidget.closingPlugin.disconnect(self.onClosePlugin)
except Exception:
pass
self.pluginIsActive = False self.pluginIsActive = False
def unload(self): def unload(self):
""" """
Wird beim Deaktivieren des Plugins aufgerufen. Entfernt Menü- und Toolbar-Eintrag. Wird beim Deaktivieren des Plugins aufgerufen. Entfernt Menü- und Toolbar-Eintrag.
""" """
self.ui.remove_action(self.action_text) if hasattr(self, "ui"):
self.ui.remove_action(self.action_text)
if self.dockwidget:
try:
self.iface.removeDockWidget(self.dockwidget)
except Exception:
pass
self.dockwidget.deleteLater()
self.dockwidget = None
def run(self): def run(self):
""" """

View File

@@ -8,6 +8,8 @@ email=michael.otto@landkreis-mittelsachsen.de
about=Provide a brief description of the plugin and its purpose. about=Provide a brief description of the plugin and its purpose.
supportsQt6=True
hasProcessingProvider=no hasProcessingProvider=no
tags=python tags=python

View File

@@ -6,7 +6,8 @@
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore # from PyQt5 import QtCore #Qt6
from qgis.PyQt import QtCore
qt_resource_data = b"\ qt_resource_data = b"\
\x00\x00\x02\x5f\ \x00\x00\x02\x5f\