blob: d3a7de608393224a4e23bae3c68ef0f9b48d5a8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "base.h"
base::base(QWidget *parent) :
QWidget(parent)
{
m_timer = new QTimer(this);
m_modalStarted = false;
m_timer->setSingleShot(false);
connect(m_timer, SIGNAL(timeout()), this, SLOT(periodicTimer()));
m_timer->start(5000);
}
void base::periodicTimer()
{
if(m_modalStarted)
exit(0);
m_modalDialog = new QDialog(this);
m_modalDialog->setModal(true);
m_modalDialog->show();
m_modalStarted = true;
}
|