-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.cpp
44 lines (32 loc) · 1.19 KB
/
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
35
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2020-2024 XMuli
// SPDX-GitHub: https://github.com/XMuli/shotx
// SPDX-Author: XMuli <xmulitech@gmail.com>
#include "mainwindow.h"
#include "screenshots.h"
#include "trayiconwindow.h"
#include <QApplication>
#include <QDebug>
#include <QFrame>
#include <QGuiApplication>
#include <QRect>
#include "toolboxwindow.h"
#include <QToolButton>
#include <QStyleFactory>
int main(int argc, char *argv[])
{
//#if (QT_VERSION > QT_VERSION_CHECK(5,6,0))
// QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//#endif
qApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication a(argc, argv);
QStringList listStyle = QStyleFactory::keys();
foreach(QString val, listStyle)
qDebug()<<val<<" ";
QApplication::setStyle("Fusion");
TrayIconWindow *trayIcon = new TrayIconWindow();
// trayIcon->show();
//ToDo: 2020-09-21 有一个 bug,刚开始初始化的时候,单击托盘的时候,其“焦点”还是在托盘上(s),
// 而没有转移到截图窗口上,所以得手动点击一下,才可以进行开始截图。而双击则不会有此问题(Mac 上)
return a.exec();
}