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
For Gerrit Dashboard: QTBUG-68620 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
231719,6 | xcb: get back to normal rounding of the scale factor for big screens | 5.11.1 | qt/qtbase | Status: ABANDONED | 0 | 0 |
231768,3 | Revert "xcb: round down the scale factor for values < 0.8" | 5.11.1 | qt/qtbase | Status: MERGED | +2 | 0 |
240429,1 | xcb: get back to normal rounding of the scale factor for big screens | dev | qt/qtbase | Status: ABANDONED | +1 | 0 |
240491,3 | xcb: use 128 as a reference DPI for small screens | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |