QMessage自动定时关闭

QMessageBox *box = new QMessageBox(QMessageBox::Information,tr("test"),tr("testtest"));
QTimer::singleShot(1500,box,SLOT(accept()));
box->exec();
原文地址:https://www.cnblogs.com/liujx2019/p/12455458.html