opengisch / QGIS-Issues-SH

QGIS Probleme und Wünsche, Kanton Schaffhausen
1 stars 0 forks source link

UI als PY in QT Designer kompilieren #77

Closed ackmar closed 2 years ago

ackmar commented 3 years ago

Wie kann ich eine bearbeitete UI im QT Designer zu einer PY kompilieren. Versuchte es alternativ per cmd auszuführen, bin aber auch da gescheitert. image

Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Program Files\QGIS 3.10\apps\Python37\Scripts>pyuic5.bat qgis_app_share_dialog_base.ui -o qgis_app_share_dialog_base.py Traceback (most recent call last): File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\PyQt5\uic\pyuic.py", line 26, in from PyQt5 import QtCore ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

m-kuhn commented 3 years ago

Lieber @ackmar

Ich gehe davon aus, du entwickelst ein eigenes Plugin?

Ich überspringe diesen Schritt eigentlich immer und lade direkt die .ui direkt in Python:

from qgis.PyQt import uic

DialogUi, DialogType = uic.loadUiType('dialog.ui')

# A class for logic defined in the user interface
class TheDialog(DialogType, DialogUi):
    def __init__(self):
        super().__init__()
        self.setupUi(self)
        # ... do more here

Wäre das auch möglich?