mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-05-17 14:49:50 +08:00
fix: unable to run in deepin without dxcb plugin
QT_QPA_PLATFORM should be dxcb;xcb on x11 platform fallback to xcb when dxcb is unavailable Log: modify QT_QPA_PLATFORM; fix wrong QTWEBENGINE_CHROMIUM_FLAGS
This commit is contained in:
parent
61b6758204
commit
d75c3a6453
13
src/main.cpp
13
src/main.cpp
@ -141,14 +141,17 @@ int main(int argc, char *argv[])
|
||||
// 龙芯机器配置,使得 DApplication 能正确加载 QtWebEngine
|
||||
qputenv("DTK_FORCE_RASTER_WIDGETS", "FALSE");
|
||||
|
||||
// 设置 QtWebEngine 环境变量
|
||||
QStringList chromium_flags;
|
||||
// 浏览器开启 GPU 支持
|
||||
// qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-features=UseModernMediaControls");
|
||||
// qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-web-security");
|
||||
// chromium_flags.append("--disable-features=UseModernMediaControls");
|
||||
// chromium_flags.append("--disable-web-security");
|
||||
// 全平台软件渲染Webkit
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu");
|
||||
#if defined (__sw_64__) || defined (__loongarch__)
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox");
|
||||
chromium_flags.append("--disable-gpu");
|
||||
#if defined __sw_64__ || __loongarch__
|
||||
chromium_flags.append("--no-sandbox");
|
||||
#endif
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromium_flags.join(" ").toUtf8());
|
||||
|
||||
/**
|
||||
* NOTE: https://zhuanlan.zhihu.com/p/550285855
|
||||
|
@ -198,7 +198,7 @@ void Utils::setQPAPlatform()
|
||||
// }
|
||||
else
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb");
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb;xcb");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user