В этом случае вы можете отследить изменение, переписав метод mousePressEvent
:
from PyQt5 import QtCore, QtWidgets
class SpinBox(QtWidgets.QSpinBox):
upClicked = QtCore.pyqtSignal()
downClicked = QtCore.pyqtSignal()
def mousePressEvent(self, event):
last_value = self.value()
super(SpinBox, self).mousePressEvent(event)
if self.value() < last_value:
self.downClicked.emit()
elif self.value() > last_value:
self.upClicked.emit()
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
s = SpinBox()
l = QtWidgets.QLabel(alignment=QtCore.Qt.AlignCenter)
w = QtWidgets.QWidget()
s.upClicked.connect(lambda: l.setText("Up"))
s.downClicked.connect(lambda: l.setText("Down"))
lay = QtWidgets.QVBoxLayout(w)
lay.addWidget(s)
lay.addWidget(l)
w.resize(320, w.sizeHint().height())
w.show()
sys.exit(app.exec_())