比如这两句,本菜鸟认为应该是一样的,但是编译错误
当然spinBox和verticalSlider的定义肯定是正确的
QSpinBox *spinBox;
QSlider *verticalSlider;
connect(ui->spinBox, SIGNAL(valueChanged(int)), ui->verticalSlider, SLOT(setValue(int)));
connect(ui->spinBox, &QSpinBox::valueChanged, ui->verticalSlider,&QSlider::setValue);
error: no matching member function for call to 'connect'
虽然直接用QT4写法无所谓,本着刨根问底的精神请求大佬解答