问题:运行后点击QPushButton时,控制台报错,并且点击没有响应点击事件
//信号与槽关联
connect(startButton, &QPushButton::click, this, &ThreadDlg::slotStart);
//点击报错,控制台打印的错误信息
QObject::connect: signal not found in QPushButton
解决方案:
QPushButton没有click信号,拼写错误,需要改为clicked
//信号与槽关联
connect(startButton, &QPushButton::clicked, this, &ThreadDlg::slotStart);