python - Strange behavior using PyQt4's 'pyqtSlot' decorator before another decorator -
I have a strange problem with using the QtCore.pyqtSlot decorator in front of the function decorated with a different decorator. The problem below shows this problem, it immediately provides a low QT program with a single button. When pressing a button, the following happens: (1) The signal 'signal_A' and 'signal_B' sequence are connected to method_A and method_B respectively. (2) signal_A and signal_B signals are emitted. (3) The required behavior is that the method_A and method_B are executed. However, it turns out that both signal_A and signal_B trigger method_A, or method_B (oddly, this is nondeterministic, and different for each part of the program!). It appears to be a bug. This issue is present when PyQt4 binding is used in Qt. It is not present when using PySide (use the '-pyside' parameter to verify) I have seen both problems in Python 2 and 3, and both in Windows and Linux This issue is related to the insertion of a decorator be...
Comments
Post a Comment