blob: 682c318a0a8d169c580e6eb395dc69bb1885dfe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <QDebug>
#include <QApplication>
#include <framework-OSInterface.h>
/*
class tester : public QObject{
Q_OBJECT
public slots:
void finished(){ QApplication::exit(0); }
public:
QTimer *timer;
tester(){
timer = new QTimer(this);
timer->setInterval(5000);
timer->setSingleShot(true);
connect(timer, SIGNAL(timeout()), this, SLOT(finished()) );
}
};
*/
int main(int argc, char** argv){
QApplication A(argc,argv);
OSInterface OS;
OS.start();
QTimer *timer = new QTimer();
timer->setInterval(5000);
timer->setSingleShot(true);
QObject::connect(timer, SIGNAL(timeout()), &A, SLOT(quit()) );
timer->start();
int ret = A.exec();
qDebug() << " - Finished";
return ret;
}
|