Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
6.2.2
-
None
-
-
258bb0c2b4 (pyside/pyside-setup/dev) 258bb0c2b4 (pyside/tqtc-pyside-setup/tqtc/dev)
Description
I suspect this will not be considered a bug, but rather something that was not officially supported before. But I'm curious to know that for sure before I change a bunch of code.
In PySide<6.2 (including 6.1.3 and all of pyside2), it used to be possible to "override" the type of the emitted signal value in a subclass of a builtin Qt type. For example
from PySide6.QtWidgets import QSlider, QApplication from PySide6.QtCore import Signal class MyWidget(QSlider): valueChanged = Signal(tuple) def __init__(self): super().__init__() self.valueChanged.connect(self._on_change) def setValue(self, value): self.valueChanged.emit(value) def _on_change(self, new_value): print("new_value:", new_value) app = QApplication([]) wdg = MyWidget() # PySide <=6.1.3 prints "new_value: (30, 40)" # PySide >=6.2 prints "new_value: 0" wdg.setValue((30, 40)) app.exec()
Can you confirm whether this is bug, or whether this is something I should give up on being able to do?
thanks!
Attachments
Issue Links
- resulted from
-
PYSIDE-1431 Equality check of some signal instances fail
-
- Closed
-
For Gerrit Dashboard: PYSIDE-1751 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
388984,5 | signal: Fix equality test for inherited signals, update | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
389826,4 | signal: Fix equality test for inherited signals, update | 6.2 | pyside/pyside-setup | Status: ABANDONED | -1 | 0 |