Details
Description
I get a segmentation fault when I try to emit a signal on a class that inherts from both QGraphicsLineItem and QObject, when I use the Python 3 feature super() to call the parent class init methods. If I instantiate each parent by directly calling their init method, the code works as intended.
The reason for inheriting from QObject is to add signal and slot capabilities to the QGraphicsLineItem.
The attached examples show the two scenarios above. In both cases, a QGraphicsScene is displayed, and when clicked with the mouse the QGraphicsLineItem/QObject hybrid object is added. In the first case, the init method contains the call super(), which should use method resolution order to call each parent constructor in turn, automatically. In the second case, I explicitly call the parent constructors. The segmentation fault occurs in the first case.
The exact error message I see is "Segmentation fault (core dumped)". There is no other information.
Attachments
Issue Links
- relates to
-
PYSIDE-1564 QObject does not support cooperative multiple inheritance
- Closed