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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.14.0
    • GUI: High-DPI
    • None
    • 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

            sorvig Morten Sørvig
            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