-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (24 loc) · 820 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (24 loc) · 820 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 "updatemanager.h"
#include <QApplication>
#include <QHotkey>
#include <QtDebug>
#include <QSettings>
int main(int argc, char *argv[])
{
// This line of code will force your system compositor to use X11 or a compatibility layer like Xwayland
#ifdef Q_OS_UNIX
qputenv("QT_QPA_PLATFORM", "xcb");
#endif
QApplication a(argc, argv);
QCoreApplication::setApplicationVersion("1.7.5");
MainWindow w;
w.setWindowFlag(Qt::WindowStaysOnTopHint, true);
w.setWindowFlag(Qt::FramelessWindowHint, true);
w.setAttribute(Qt::WA_TranslucentBackground, true);
QIcon icon(":/assets/512x512/stopwatchpicture.png");
if (icon.isNull()) qWarning() << "Failed to load icon from resource!";
a.setWindowIcon(icon);
w.show();
return a.exec();
}