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

Windows 10 tablet mode: QWidget::restoreGeometry() should ignore geometry as applications should show maximized?

    XMLWordPrintable

    Details

    • Commits:
      Add query function: 45f80a52c2d01ba14f550e48e32d95748a3ff444 (qtbase/dev, 18.1.2017,5.9)

      Description

      When a Windows 10 PC is set to tablet mode and a Qt application is launched, if the main window calls restoreGeometry() with a previously saved geometry, it prevents the window from being shown maximized, which is expected behavior on windows 10 tablet mode.

      If the call to restoreGeometry is delayed by about a second, then it has no effect (at this time the window is in maximized state because the desktop shell has put it in that state).

      Qt should be checking if the monitor for the window is in tablet mode and making the restoreGeometry operation a no-op in that case. For sample code on how to check if a monitor is in tablet mode, see

      https://blogs.msdn.microsoft.com/oldnewthing/20160706-00/?p=93815

      While I have only tested this with 5.4.1 and 5.6.1 it likely affects all Qt versions.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              kovidgoyal Kovid Goyal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes