Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.15.4, 6.3.0
-
None
-
Python 3.10
PySide6 6.3.0
shiboken6 6.3.0
Linux
-
d58e262b11 (pyside/pyside-setup/dev) 5ed3e6f5dd (pyside/pyside-setup/6.3) bdfd9e0a50 (pyside/pyside-setup/6.4) 5ed3e6f5dd (pyside/tqtc-pyside-setup/6.3) bdfd9e0a50 (pyside/tqtc-pyside-setup/6.4) bdfd9e0a50 (pyside/tqtc-pyside-setup/tqtc/6.4)
Description
Defining __slots__ in a PySide subclass segfaults on attribute assignment
from PySide6.QtCore import QObject class Obj(QObject): __slots__ = ("a",) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.a = 1 # <<< segfaults here obj = Obj()
Note: the __slots__ is python feature unrelated to Qt's signal/slot mechanism.
https://docs.python.org/3/reference/datamodel.html?highlight=__slots__#object.__slots__
Attachments
Issue Links
- relates to
-
PYSIDE-2208 __slots__ on Qt derived classes do not work or crash the application
- Closed