代码:
QObject::connect(pSpin, SIGNAL(valueChanged(int)), pSlider, SLOT(setValue(int)));
QObject::connect(pSlider, SIGNAL(valueChanged(int)), pSpin, SLOT(setValue(int)));
设置QSlider移动步长:
ui->slider->setSingleStep(int);
代码:
QObject::connect(pSpin, SIGNAL(valueChanged(int)), pSlider, SLOT(setValue(int)));
QObject::connect(pSlider, SIGNAL(valueChanged(int)), pSpin, SLOT(setValue(int)));
设置QSlider移动步长:
ui->slider->setSingleStep(int);