-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
34 lines (26 loc) · 862 Bytes
/
main.cpp
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
#include <qapplication.h>
#include <QSplashScreen>
#include <QTextCodec>
#include "mainWindow.h"
#include "def.h"
#include<unistd.h>
#include<signal.h>
int main(int argc, char **argv)
{
QApplication a(argc, argv);
QTextCodec *codec = QTextCodec::codecForName("system"); //获取系统编码
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForTr(codec);
MainWindow mainWindow;
//QSplashScreen *splash = new QSplashScreen;
//splash->setPixmap(QPixmap(":/images/splash.png"));
//splash->show();
// Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
// splash->showMessage(QObject::tr("loading..."), topRight, Qt::white);
//splash->finish(&mainWindow);
//delete splash;
mainWindow.resize(1000, 600);
mainWindow.show();
return a.exec();
}