Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.0.0, 6.0.1, 6.5.3
-
None
Description
Hey
This code will cause crash>
import sys from PySide6.QtWidgets import QApplication, QProxyStyle, QWidget app = QApplication() class MyProxyStyle(QProxyStyle): def __init__(self): QProxyStyle.__init__(self) self.setBaseStyle(QApplication.style()) s =MyProxyStyle() s.deleteLater() w =QWidget() w.show() sys.exit(app.exec_())
Can any1 help out?
It could be related to > https://bugreports.qt.io/browse/PYSIDE-922
UPDATE
I've made a fully working example showing the issue. Please have look at styleVersionTest_01.py.
There are 6 buttons, each of them creates a tree view with a different QProxyStyle. The Inherited Style takes app.style() as base style while default() style does not. As you can see the default style has a different style to the currently applied app style. Thus it does not inherit from the app by default as it should. When it comes to deletion after you add the 3 views, go on and delete the 3 vies and you will get a crash.
Attachments
Issue Links
- relates to
-
PYSIDE-861 QApplication.setStyle(QStyle *style) crashes
- Closed
-
PYSIDE-922 Crash when using QProxyStyle
- Closed
-
PYSIDE-2605 runtime error when getting the style of a widget in embedded application
- Closed