-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (23 loc) · 769 Bytes
/
Copy pathmain.cpp
File metadata and controls
29 lines (23 loc) · 769 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
#include "MouseAssistantStd.h"
#include <QApplication>
#include <QFile>
#include <QTextStream>
#include <QTextCodec>
#include <QDebug>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
// 设置全局编码为UTF-8
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
// 加载QSS样式表
QFile styleFile(":/style.qss");
if (styleFile.open(QFile::ReadOnly | QFile::Text)) {
QTextStream stream(&styleFile);
app.setStyleSheet(stream.readAll());
styleFile.close();
}
MouseAssistantStd keyPresser;
keyPresser.setWindowIcon(QIcon(":/mouse.ico"));
keyPresser.setWindowTitle(QStringLiteral("鼠标助手 标准版"));
keyPresser.show();
return app.exec();
}