Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.13.2
-
None
Description
How to reproduce:
make the simplest QtQuick project with QML:
import QtQuick 2.13 import QtQuick.Controls 2.13 ApplicationWindow { title: "My Application" width: 640 height: 480 visible: true Label { text: "TEXT" anchors.centerIn: parent } }
make the simplest cpp file:
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQuickStyle> int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQuickStyle::setStyle("Material"); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); }
and add quickcontrols2 to pro file
QT += quick quickcontrols2
Build the project for UWP in Qt 5.13.2.
The first test
Change the font size for the system to 100%.
Run the app.
Change the font size for the system to 150%.
The size of the text (Label) does not change. <<-- This is the problem.
The second test
Remove teh line from cpp
QQuickStyle::setStyle("Material");
Build the project
Change the font size for the system to 100%.
Run the app.
Change the font size for the system to 150%.
The size of the text (Label) is bigger and this is correct. <<-- All OK.