We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c303cde + 20da4c8 commit 2ad0147Copy full SHA for 2ad0147
spark-webapp-runtime/main.cpp
@@ -11,6 +11,7 @@
11
#include <QCommandLineOption>
12
#include <QFileInfo>
13
#include <QSettings>
14
+#include <QVector>
15
16
#include "globaldefine.h"
17
#include "httpd.h"
@@ -35,7 +36,14 @@ int main(int argc, char *argv[])
35
36
Dtk::Widget::DApplication::loadDXcbPlugin();
37
#endif
38
- DApplication a(argc, argv);
39
+ // 强制使用DTK平台插件
40
+ QVector<char *> fakeArgv(argc + 2);
41
+ fakeArgv[0] = argv[0];
42
+ fakeArgv[1] = "-platformtheme";
43
+ fakeArgv[2] = "deepin";
44
+ for(int i = 1; i < argc; i++) fakeArgv[i + 2] = argv[i];
45
+ int fakeArgc = argc + 2;
46
+ DApplication a(fakeArgc, fakeArgv.data());
47
48
a.loadTranslator();
49
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
0 commit comments