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

[HiDPI] Add interface to QWindow to set the device pixel ratio manually

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: GUI: Window management
    • Labels:
      None
    • Technical Risk:
      Normal

      Description

      Why it is needed?
      In some cases when AA_EnableHighDpiScaling is enabled, Qt automatically changes the DPR scale for the window according to the screen DPR. The software developer is unable to set it on its own - independently from the Qt.

      Use cases:

      • override automatically set of DPR,
      • allow the application to behave the same way on all platforms,
      • allow to set the DPR manually avoiding automatic changes when resolution/screen changes,
      • avoid possible auto-dpr bugs,

      Usage proposal:

      auto w = new QWindow;
      ...
      w->setDevicePixelRatio(2.0);
      

      What happens:

      • AA_EnableHighDpiScaling is ignored for this window,
      • window is permanently set to DPR of 2.0,

        Attachments

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

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zaps166 Błażej Szczygieł
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes