This commit is contained in:
zhuzichu 2023-08-24 16:02:41 +08:00
parent be5e8a4a88
commit a1199a9e9c
2 changed files with 8 additions and 5 deletions

View File

@ -16,6 +16,13 @@ FRAMELESSHELPER_USE_NAMESPACE
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
#endif
//将样式设置为Basic不然会导致组件显示异常 //将样式设置为Basic不然会导致组件显示异常
qputenv("QT_QUICK_CONTROLS_STYLE","Basic"); qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
FramelessHelper::Quick::initialize(); FramelessHelper::Quick::initialize();

View File

@ -1,7 +1,3 @@
//#if defined(_MSC_VER) && (_MSC_VER >= 1600)
//#pragma execution_character_set("utf-8")
//#endif
#ifndef STDAFX_H #ifndef STDAFX_H
#define STDAFX_H #define STDAFX_H