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

[REG] WebEngineView and showMaximized()

    XMLWordPrintable

Details

    • Linux/X11, Windows

    Description

      Consider this simple application:{}

       

      #include <QApplication>
      #include <QMainWindow>
      #include <QWebEngineView>auto main(int argc, char * argv[]) -> int
      {
          auto Application = QApplication{argc, argv};
          auto MainWindow = QMainWindow{};
          auto WebEngineView = QWebEngineView{&MainWindow};
          
          MainWindow.setCentralWidget(&WebEngineView);
          MainWindow.showMaximized();
          
          return Application.exec();
      }

       

      This will not show the MainWindow as maximized as you would expect. Since I'm getting this error on Windows and Linux, I don't think it has anything to do with a window manager.

      Interestingly, on Windows, I get a maximized window flicker and then it immediately goes back to the small default size window.

      Additionally, if I load some web page in the WebEngineView before calling showMaximized(), I get a maximized window. If I load the web page after showMaximized(), the window is not maximized. If I call showMaximized() again, after loading the page, I get a maximized window.

      Attachments

        For Gerrit Dashboard: QTBUG-115074
        # Subject Branch Project Status CR V

        Activity

          People

            tokorpip Tomi Korpipää
            hagen.moebius Hagen Möbius
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change