Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.15.0
-
None
-
PySide2 5.15, python 3.7.7
Description
I'm reporting this here because I don't remember seeing this under PyQt5. Python gives me a RecursionError with the following code:
from PySide2.QtCore import Slot, QMetaObjectfrom PySide2.QtCore import Slot, QMetaObject from PySide2.QtWidgets import QApplication, QComboBox class MyCombo(QComboBox): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.setObjectName('combo') QMetaObject.connectSlotsByName(self) @Slot(int, name='on_combo_currentIndexChanged') def change_current(self, _): print('never') app = QApplication([]) combo = MyCombo() combo.show() combo.addItem('Foo') app.exec_()
Error:
RecursionError: maximum recursion depth exceeded while calling a Python object
The error appears when addItem() is called. Strangely, it only happens with the Slot decorator present. If remove the decorator and change the name of the slot to on_combo_currentIndexChanged the error does not appear.
Attachments
Issue Links
- is duplicated by
-
PYSIDE-1086 Named slot is not working
- Closed