QT -- SpinBox与Slider的连接connect

代码:

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); 
posted @ 2021-01-28 16:39  手磨咖啡  阅读(530)  评论(0编辑  收藏  举报