-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (41 loc) · 1.17 KB
/
main.cpp
File metadata and controls
51 lines (41 loc) · 1.17 KB
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
44
45
46
47
48
49
50
51
#include "mainwindow.h"
#include <QApplication>
#include <QFile>
#include <QIODevice>
#include <QIcon>
#include "qdebug.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qRegisterMetaType<QList<QSerialPortInfo>>();
qRegisterMetaType<MMM_Commands>();
qRegisterMetaType<TOOL_TYPE>();
qRegisterMetaType<ADB_Commands>();
qRegisterMetaType<signalStructure>();
// setting Software Version
a.setApplicationVersion("0.0.3");
QString fullStyleSheetData="";
QString fileLocation = ":/Incrypt.qss";
if(QFile::exists(fileLocation))
{
QFile *styFile = new QFile(fileLocation);
if(styFile->open(QIODevice::ReadOnly)){
fullStyleSheetData = QLatin1String(styFile->readAll());
//qDebug()<<" File open and read sucess: "<<fullStyleSheetData;
}
else {
qDebug()<<" Error in opening file: ";
}
styFile->close();
}
else {
qDebug()<<" File did not found ";
}
QIcon icon(":/pics/logo round.png");
//FirstWindow w;
MainWindow w;
w.setStyleSheet(fullStyleSheetData);
w.setWindowIcon(icon);
w.show();
return a.exec();
}