Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
6.2.2
-
None
-
Python 3.9+ (likely older versions too), macOS/Windows (likely linux as well)
-
-
85799120d0 (pyside/pyside-setup/dev) 85799120d0 (pyside/tqtc-pyside-setup/dev) 3e5399f685 (pyside/pyside-setup/6.2) 3e5399f685 (pyside/tqtc-pyside-setup/6.2) 85799120d0 (pyside/tqtc-pyside-setup/tqtc/dev) 3e5399f685 (pyside/pyside-setup/6.2.3)
Description
Note: This issue is new with 6.2.2; but that is not available as a selection from the "Affects Version/s" drop down.
New in PySide 6.2.2, there is an issue involving multiple inheritance, where a method from the first super-class is the same as a signal from a second-superclass, the signal is called instead of the method regardless of inheritance order.
Below is a minimum reproducible example
from PySide6 import QtCore class Q(QtCore.QObject): signal = QtCore.Signal() def method(self): print('Q::method') class M: def signal(self): print('M::signal') def method(self): print('M::method') class C(M, Q): def __init__(self): Q.__init__(self) M.__init__(self) c = C() c.method() # okay c.signal() # problem on PySide6 6.2.2
For completeness, a work-around has been identified that works for all our use-cases:
Python 3.8 Qt 6.1.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.2.1 20191120 (Red Hat 9.2.1-2)) [limited API] M::method M::signal
versus
Python 3.8 Qt 6.2.2 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 9.3.0) M::method Traceback (most recent call last): File "pyside1730.py", line 36, in <module> c.signal() # problem on PySide6 6.2.2 TypeError: native Qt signal is not callable
Attachments
Issue Links
- resulted from
-
PYSIDE-1431 Equality check of some signal instances fail
- Closed
For Gerrit Dashboard: PYSIDE-1730 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
385819,4 | PySide6: build multiple inheritance pass-through for Signals | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
386241,4 | PySide6: build multiple inheritance pass-through for Signals | 6.2 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
386351,1 | PySide6: build multiple inheritance pass-through for Signals | tqtc/lts-5.15 | pyside/tqtc-pyside-setup | Status: ABANDONED | 0 | 0 |