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

The window state is not updated when a window is restored by the window manager

XMLWordPrintable

      I have a Window inheriting QGaphicsView with the attributes Qt::FramelessWindowHint|Qt::Window

      When restoring that window ( previously minimized by showMinimized), the value of windowState is not updated

      There is a workaround for showMinimized:

       
      void Window::minimize(){
      	 setWindowState(windowState()|Qt::WindowMinimized);
      	 QApplication::processEvents();
      	 setWindowState(windowState()&~Qt::WindowMinimized);
      }
      

      I traced the event when restoring the window and nothing appear (in both event and changeEvent), I guess that is the root cause of this issue.

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

            Unassigned Unassigned
            cor3ntin Corentin Jabot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes