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

QWidget Rendering error when Windows11 laptop lid close then reopen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2, 5.15.16
    • OS: windows 11 laptop (version: 10.0.22621),
      CPU: AMD Ryzen 7 5800H with Radeon Graphics
      RAM: 40960MB
      GPU: RTX 3060 Laptop GPU
    • Windows

    Description

      When a laptop running Windows 11 is connected to an external screen, QWidget windows may encounter rendering errors when the laptop lid is closed and reopened.

      The attachment contains the source code zip and video

      This is reproducible only on Windows11

      when first launch:

      when close the laptop lid, then reopen it:

      1, The laptop screen resolution is 2560 * 1600 (recommend),DPI scaling is 150% (recommend)
      2, The external screen resolution is 1920 * 1080 (recommend), and the DPI scaling is 100% (recommend)

      #include "mainwindow.h"
      
      #include <QApplication>
      
      int main(int argc, char *argv[])
      {
          // for 150% 175% dpi
          QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
              Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
          // for high dpi
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      
          QApplication a(argc, argv);
          MainWindow w;
          w.show();
          return a.exec();
      }
      

      Attachments

        1. executable.zip
          17.24 MB
        2. IMG_2999.mp4
          14.67 MB
        3. screenshot-1.png
          screenshot-1.png
          195 kB
        4. screenshot-2.png
          screenshot-2.png
          197 kB
        5. systemInfo.txt
          18 kB
        6. systemInfo-1.txt
          18 kB
        7. TestWin11Laptop5-15-16.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            leilei.ren leilei ren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes