• 1832阅读
  • 2回复

[提问]在mainwindow定义个qstringlist,然后在别的dlg调用添加字符串,总是报错,为什么? [复制链接]

上一主题 下一主题
离线iloveghq
 

只看楼主 倒序阅读 楼主  发表于: 2020-05-27

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);
    }
}
离线20091001753

只看该作者 1楼 发表于: 2020-05-27
strListLog->count()

strListLog.insert()

细心点。
(づ ̄ 3 ̄)づ
离线九重水

只看该作者 2楼 发表于: 2020-05-27
编译不报错的吗?
快速回复
限100 字节
 
上一个 下一个