-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (26 loc) · 701 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (26 loc) · 701 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
#include "mainwindow.h"
#include "backend.h"
#include <QApplication>
#include <QFile>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QFile f(":qdarkstyle/dark/style.qss");
if (!f.exists())
{
qDebug() << "Unable to set stylesheet, file not found\n";
}
else
{
f.open(QFile::ReadOnly | QFile::Text);
QTextStream ts(&f);
a.setStyleSheet(ts.readAll());
qDebug() << "Stylesheet successfully loaded";
}
Backend backend;
QObject::connect(&backend, &Backend::resultReady, [](const QString &result)
{ qDebug() << result; });
MainWindow w(&backend);
w.show();
return a.exec();
}