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

QWidget::showNormal() doesn't work if window moved right after

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.15.7
    • GUI: Window management
    • None
    • Windows

    Description

      When running the QWidget following code on a maximized window:

      showNormal();
      move(100, 100);
      

      The widget will get the maximized geometry instead of the normal geometry.
      Tested on Ubuntu and KDE.

      Testcase attached.

      It's also strange that when maximizing the window we get two QWindow::windowStateChanged(MaximizedState) signals emitted, with the same value.

      While I understand the reason (1 signal is emitted by Qt, sync, and the other one when the window manager replies, async), it doesn't look like clean API.

      Assuming TQC won't fix this, as it's probably hard, what would be a workaround that doesn't involve a timer ? We need a way to know it's safe to call move().

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            iamsergio Sergio Martins
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes