Details
Description
The code below was working properly
with 5.2, 5.2.1 and 5.3
With 5.3.1 the returned values are zeroes
not depending on where the code is called.
physicalDotsPerInchX and Y are returning inf values.
QScreen* firstScreen = QGuiApplication::primaryScreen(); if (firstScreen) { qreal widthMM = firstScreen->physicalSize().width(); qreal heightMM = firstScreen->physicalSize().height(); qreal diagonalMM = sqrt(widthMM*widthMM + heightMM*heightMM); qDebug() << "Screen (first) Inches Size is: " << diagonalMM; }
Attachments
For Gerrit Dashboard: QTBUG-39978 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
88760,2 | Android: [REG] Fix QScreen::physicalSize() | 5.3 | qt/qtbase | Status: MERGED | +2 | 0 |