Description
We embed qt and python in our application. When we run python code we don't need to create a QApplication (it already exists).
Running:
from PySide6 import QtCore, QtWidgets
combo = QtWidgets.QComboBox()
view = combo.view()
print(view.style())
will throw:
RuntimeError: Internal C++ object (PySide6.QtWidgets.QCommonStyle) already deleted.
The workaround consists in calling:
QtWidgets.QApplication.instance()
once (just after the import).
But it would be nice not having to do that.
Attachments
Issue Links
- relates to
-
PYSIDE-1144 Embedded Python/PySide QApplication::Instance() returns QCoreApplicationWrapper instance
- Closed
-
PYSIDE-1504 QProxyStyle crash app !
- Closed
-
PYSIDE-571 Support the qApp macro correctly
- Closed