Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86673

QScreen::devicePixelRatio() returns the wrong value on multiple display with HiDPI

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.14.0
    • Fix Version/s: None
    • Component/s: GUI: High-DPI
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      Here is a pseudo code to reproduce the pb on Windows 10, first screen at 150%, second at 100%

      for( int i = 0; i < qApp->screens().size(); i++ ) {
         std::cout << "Screen factor: " << qApp->screens().at( i )->devicePixelRatio() << std::endl; 
      }
      

      The result here is: 

      Screen factor: 1.5
      Screen factor: 1.5

      And it should gives 1.5, 1

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            simonesneault Simon Esneault
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes