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

Scalable UI

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • GUI: High-DPI
    • None
    • Scalable UI for Qt

    Description

      Overall goal:

      Improve support for scalable UI by adding support for scaling at the QWindow level. This will enable fine-grained control over where and when scaling is applied, using C++ or QML API. In addition we can also support more advanced scaling modes where Qt computes the scale factor based on window size hints.

      Existing support:

      • Coordinate system scaling at the QScreen level
      • API: setting QT_SCALE_FACTOR at application startup
      • Graphics pipeline supports drawing at any DPR, with some limitations (widgets/raster, native styles)
      • Qt for WebAssembly supports page zoom: can be used as a demo/test case.

      Proposed changes:

      • Formalize/document coordinate system scaling by introducing internal and external coordinate systems. The existing QScreen coordinate system scaling implementation uses this approach, although it is not documented using these terms.
      • Add support for scaling the QWindow coordinate system.
      • Add C++ API for setting per-window scale factors
      • Add support for computing the window scale factor based on minimum/maximum size and available size.

      Out of scope:

      • Adding additional requirements for raster / widgets / styles beyond what is already required for e.g. Windows support.

      Coordinate System Explainer:

       TODO

      Prototype:

      https://codereview.qt-project.org/c/qt/qtbase/+/440265  

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-108002
          # Subject Branch Project Status CR V

          Activity

            People

              sorvig Morten Sørvig
              sorvig Morten Sørvig
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change