int i = ui.spinBox->value(); if (i % 2) { ui.spinBox->setValue(++i); }
ui.spinBox->blockSignals( true );ui.spinBox->setValue(++i);ui.spinBox->blockSignals( false );