iloveghq |
2020-05-27 15:51 |
在mainwindow定义个qstringlist,然后在别的dlg调用添加字符串,总是报错,为什么?
void brightDlg::BtnRightClick() { parentDlg->onAddLogInfo(tr("1111")); }
void MainWindow::onAddLogInfo(QString str) { if(strListLog->count()<INFO_COUNT) { strListLog.insert(0,str); } else { strListLog.removeLast(); strListLog.insert(0,str); } } |
|