【发布时间】:2015-12-04 01:29:28
【问题描述】:
我将 QSpinBox 的 Signal valueChanged 连接到 QWidget 的函数,例如:
class MyWidget(QtGui.QWidget):
def __init__(self, *args):
QtGui.QWidget.__init__(self, *args)
#just an example
mySpinBox = QtGui.QSpinBox()
mySpinBox.valueChanged.connect(self.foo)
def foo(self):
if value was changed by Mouse Wheel:
#do this
else:
#do nothing
【问题讨论】: