diff options
Diffstat (limited to 'sources/pyside6/plugins/designer/designercustomwidgets.cpp')
| -rw-r--r-- | sources/pyside6/plugins/designer/designercustomwidgets.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/pyside6/plugins/designer/designercustomwidgets.cpp b/sources/pyside6/plugins/designer/designercustomwidgets.cpp index c62f8b6fc..5988dff4e 100644 --- a/sources/pyside6/plugins/designer/designercustomwidgets.cpp +++ b/sources/pyside6/plugins/designer/designercustomwidgets.cpp @@ -224,7 +224,9 @@ PyDesignerCustomWidgets::PyDesignerCustomWidgets(QObject *parent) : QObject(pare qputenv(pythonPathVar, value); } - initPython(); + // Might be initialized already, for example, when loaded from QUiLoader. + if (Py_IsInitialized() == 0) + initPython(); // Run all register*py files QString errorMessage; |
