add 3 second timer before OK shows up

This commit is contained in:
stonedDiscord 2021-01-04 16:44:14 +01:00
parent 5ab50c8431
commit 04ed1a1812

View File

@ -1,5 +1,6 @@
#include <QCoreApplication>
#include <QMessageBox>
#include <QTimer>
#include "debug_functions.h"
@ -24,6 +25,10 @@ void call_notice(QString p_message)
msgBox->setWindowTitle(
QCoreApplication::translate("debug_functions", "Notice"));
// msgBox->setWindowModality(Qt::NonModal);
msgBox->setStandardButtons(QMessageBox::NoButton);
QTimer::singleShot(3000, msgBox, std::bind(&QMessageBox::setStandardButtons,msgBox,QMessageBox::Ok));
msgBox->exec();
}