Qt find out if QSpinBox was changed by user
问题 Let's suppose I have a QSpinBox , how I can find out if the value was changed manually from user or from a other function? EDIT: I want to do some actions only when user change values but if your program does it (setValue) I don't want do this actions. 回答1: Possible solution: ui->spinBox->blockSignals(true); ui->spinBox->setValue(50); ui->spinBox->blockSignals(false); In this case, signal will not be emitted, so all what you can catch by valueChanged() signal is only user's action. For