RibbonUI: Remove the "'AA_EnableHighDpiScaling' is deprecated" warning.

This commit is contained in:
Mentalflow 2024-07-30 00:44:31 +08:00
parent 662fbb260c
commit 8ccc7d3920
Signed by: Mentalflow
GPG Key ID: 5AE68D4401A2EE71
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ void RibbonUI::init()
qputenv("QSG_RHI_BACKEND", "opengl"); qputenv("QSG_RHI_BACKEND", "opengl");
#endif #endif
QQuickWindow::setDefaultAlphaBuffer(true); QQuickWindow::setDefaultAlphaBuffer(true);
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
} }
void RibbonUI::registerTypes(const char *uri) void RibbonUI::registerTypes(const char *uri)