-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
43 lines (38 loc) · 932 Bytes
/
Copy pathmain.cpp
File metadata and controls
43 lines (38 loc) · 932 Bytes
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
39
40
41
42
43
#pragma once
#pragma execution_character_set("UTF-8")
#include "mini_search.h"
#include "test.h"
#include <QtWidgets/QApplication>
#include <QFile>
#include <QTextCodec>
#include <QSplashScreen>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
QTextCodec::setCodecForLocale(codec);
QPixmap pixmap("images\\logo.png");
QSplashScreen screen(pixmap);
screen.show();
#if 0
int delayTime = 5;
QElapsedTimer timer;
timer.start();
while (timer.elapsed() < (delayTime * 1000))
{
app.processEvents();
}
#endif
#if 0
QDateTime n = QDateTime::currentDateTime();
QDateTime now;
do{
now = QDateTime::currentDateTime();
app.processEvents();
} while (n.secsTo(now) <= 5);//5为需要延时的秒数
#endif
mini_search* w = new mini_search;
w->show();
screen.finish(w);
return a.exec();
}