Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
GXDE-OS
gxde-remote-desktop-accessor
Repository navigation
Code
Issues
1
(1)
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
gxde-remote-desktop-accessor
/
main.cpp
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
42 lines (35 loc) · 1.71 KB
master
Breadcrumbs
gxde-remote-desktop-accessor
/
main.cpp
Copy path
Top
File metadata and controls
Code
Blame
42 lines (35 loc) · 1.71 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
/*
* 如果你想学习更多有关知识,可以访问以下网址:
* DTK相关文档地址:https://linuxdeepin.github.io/dtk
* Deepin项目地址:https://github.com/linuxdeepin
* 社区项目投递地址:https://gitee.com/deepin-opensource
*/
#include "mainwindow.h"
#include <DApplication>
#include <QVector>
DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[])
{
DApplication::loadDXcbPlugin(); // 已废弃,但是对于非deepin桌面可以正常使用标题栏
DApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // 开启 Hidpi 支持
// 程序内强制添加"-platformtheme deepin"参数喂给Qt让Qt正确使用Deepin主题修复各种奇怪样式问题
QVector<char*> fakeArgs(argc + 2);
fakeArgs[0] = argv[0];
fakeArgs[1] = "-platformtheme";
fakeArgs[2] = "deepin";
for(int i = 1; i < argc; i++) fakeArgs[i + 2] = argv[i];
int fakeArgc = argc + 2; // 为啥DApplication的argc要用引用啊?
DApplication a(fakeArgc, fakeArgs.data());
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
a.loadTranslator(); //加载翻译
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
a.setOrganizationName("gfdgd xi"); //设置组织名称
a.setApplicationVersion(DApplication::buildVersion("1.2.0-1"));//设置程序版本
a.setProductIcon(QIcon::fromTheme("/opt/durapps/spark-simple-remote-desktop-accessor/icon.svg")); //设置程序Logo
a.setProductName("远程桌面连接器"); //设置项目名称
a.setApplicationDescription("一个 rdp 远程桌面连接器(基于rdesktop)");//设置程序介绍
a.setApplicationName("远程桌面连接器"); //只有在这儿修改窗口标题才有效
MainWindow w;
w.show();
return a.exec();
}
You can’t perform that action at this time.