no matching function for call to XXX::connect()
问题
在mainwindow类中使用historydata类的信号,调用connect()函数
connect(historydata, &HistoryData::dataShow, [this](QString message){
this->ui->pTE->moveCursor(QTextCursor::End);
this->ui->pTE->insertPlainText(message);});
solving
Qt新添加的类,默认是custom的,没有QObject宏,无法使用connect函数特性
函数重载
函数名相同,但是参数是不同的