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

Native windows not properly displayed when QT_SCALE_FACTOR/QT_FONT_DPI set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P1: Critical
    • None
    • 6.2.4, 6.5.1, 6.6.0
    • GUI: High-DPI
    • None
    • macOS

    Description

      Native windows not properly displayed when QT_SCALE_FACTOR/QT_FONT_DPI set

      The image below contains a widget and a single QPushButton in it. The button is just an example, the important thing that it has Qt::WA_NativeWindow attribute and QT_SCALE_FACTOR != 1.

      This is a regression from Qt5. I was able to reproduce it in 6.2.4, 6.5.1, 6.6.0.

      Sample project attached. Compile with Qt6 and run with QT_SCALE_FACTOR=2, e.g.,

      $ QT_SCALE_FACTOR=2 open proj.app 

       

       

       

      Attachments

        1. image-2023-07-10-15-57-23-339.png
          image-2023-07-10-15-57-23-339.png
          25 kB
        2. main.cpp
          0.5 kB
        3. proj.qpro
          0.0 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            vengelgardt Vladimir Engelgardt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes