-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
33 lines (26 loc) · 886 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
#include <QApplication>
#include "sfo.h"
#include "appinfo.h"
#include <QFile>
int main(int argc, char *argv[]) {
// This function must be called before creating the QGuiApplication object
QApplication::setDesktopSettingsAware(true);
QApplication app(argc, argv);
app.setApplicationName(applicationName);
app.setApplicationVersion(applicationVersion);
app.setWindowIcon(QIcon(":/res/logo/SFO_v2.ico"));
app.setApplicationDisplayName(applicationDisplayName);
app.setEffectEnabled(Qt::UI_AnimateMenu, true);
// open qss file
QFile file(":/res/qss-template/Toolery.qss");
file.open(QFile::ReadOnly);
// setup stylesheet
app.setStyleSheet(file.readAll());
sfo window;
window.setWindowTitle(applicationDisplayName);
window.setMinimumSize(minAppSize);
window.setAcceptDrops(false);
window.setDisabled(false);
window.show();
return app.exec();
}