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

showMaximized does not work when Qt::WA_ShowWithoutActivating is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.4, 6.5.3, 6.6.0
    • QPA: Windows
    • None
    • Windows

    Description

      Considering the following code:

      #include <QApplication>
      #include <QWidget>
      
      int main(int argc, char** argv) {
          auto app = QApplication{argc, argv};
          auto win = QWidget{};
          win.setAttribute(Qt::WA_ShowWithoutActivating);
          win.showMaximized();
          return app.exec();
      } 

      Expected result: The window should be maximized.

      Actual result: The window is not maximized.

      Note: If I don't set the Qt::WA_ShowWithoutActivating attribute, the window is properly maximized.

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            pollux42 Simon Nivault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes