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

[Reg 5.7.1 -> 5.8] Setting a QDockWidget with a QQuickWidget in it to floating crashes the renderer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 5.8.0, 5.9.0, 5.9.1, 5.9.2, 5.9.3, 5.10.0
    • None
    • Linux zebra 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux

    Description

      Consider

      #include <QApplication>
      #include <QDockWidget>
      #include <QQuickWidget>
      #include <QMainWindow>
      #include <QTimer>
      
      class MainWindow : public QMainWindow
      {
          Q_OBJECT
      
      public:
          explicit MainWindow(QWidget *parent = 0) :
              QMainWindow(parent)
          {
              QDockWidget *dock = new QDockWidget(this);
              QQuickWidget *quick = new QQuickWidget(dock);
              quick->setSource(QUrl("qrc:/main.qml"));
      
              QTimer::singleShot(1000, dock, [dock]() { dock->setFloating(true); });
          }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          MainWindow w;
          w.show();
      
          return a.exec();
      }
      
      #include <main.moc>
      

      With a simple main.qml:

      import QtQuick 2.0
      
      Rectangle {
          width: 500
          height: 500
      
          color: "green"
      
          MouseArea {
              anchors.fill: parent
              onClicked: console.log("clicked")
          }
      }
      

      With 5.7.1 this cleanly detaches after a second. From 5.8.0 on it crashes instead.

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes