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

Custom cursor is incorrectly sized if Override high DPI scaling is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.9.4
    • QPA: Windows
    • None
    • Windows 10 64 bit
    • Windows

    Description

      If the Override high DPI scaling behavior is set to System in the application's Compatibility settings, any custom QCursor loaded from a pixmap draws too small on a monitor with DPI scaling above 100%.  The same cursor draws correctly with different monitor DPI scalings if the Override is not done.  

      We are setting these:

      QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

      The cursor is being set like this:

      QPixmap pixmap(cursorPath);
      pixmap.setDevicePixelRatio(1.75);
      return QCursor(pixmap);

       

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            smoak Steve Moak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes