Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.11
-
None
-
Ubuntu 18.04
In Settings > Devices > Screen Display, my settings are:
* Scale: 200%
* Resolution: 3840 x 2160 (16:9)
-
89f9a3db15940ea87d6ad89f93bfa5aa1d7564fb
Description
The following window (and its contents, should it have any) is the correct size with 5.10 and v5.11.0, but with the latest 5.11 the device pixel ratio (2) is ignored and it is half the size it should be:
main.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); }
main.qml
import QtQuick 2.8 import QtQuick.Window 2.2 Window { width: 1200 height: 800 visible: true }
This happens when running the application from Creator or on the command line.
Attachments
Issue Links
- relates to
-
QTBUG-64051 Qt applications do not adapt to changing DPI scaling factor on Gnome
- Closed