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

[REG 5 → 6] QQuickWidget causes dialog to be inadvertently maximized

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5
    • 6.6.1, 6.7
    • Quick: Widget
    • None
    • Fedora 39, KDE Plasma
    • Linux/Wayland, Linux/X11
    • aecedfed9ab763513af8fda5a2b208b263da3f65

    Description

      Originally reported as https://bugs.kde.org/show_bug.cgi?id=478997

      Minimal code example:

      QMainWindow win;
      auto button = new QPushButton("Push me baby one more time");
      win.layout()->addWidget(button);
      
      QObject::connect(button, &QPushButton::clicked, [&win]{
          QDialog *dlg = new QDialog(&win);
          QWidget *w = new QWidget(dlg);
          QQuickWidget *qw = new QQuickWidget(w);
          dlg->show();
      });
      win.show(); 

      Full buildable code at https://invent.kde.org/nicolasfella/qquickwidgettest

      When pressing the button when the main window is maximized the dialog will also be maximized (which it should not be). When the main window is not maximized the dialog will not be maximized either (as expected).

      Removing the QQuickWidget makes it work as expected. Somehow the creation of the QQuickWidget influences the dialog's window state.

      This works as expected in Qt 5.15.

      Tested with Qt 6.6.1 and current 6.7 branch on Wayland and X11.

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            nicolasfella Nicolas Fella
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes