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

Crash in QQuickWidget on a simple qml project when setResizeMode/size is not set

    XMLWordPrintable

Details

    Description

      Attached is a project with a widget and c++ code as simple as it gets, that crashes on launch.
      Note, that uncommenting the two lines below fixes the crash.

      //c++ part
      #include <QApplication>
      #include <QQuickWidget>
      
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QQuickWidget* w= new QQuickWidget();
          w->setSource(QUrl::fromLocalFile("w.qml"));
          //w->setResizeMode(QQuickWidget::SizeRootObjectToView);
          //w->resize(400,400);
          w->show();
      
      
          return a.exec();
      }
      
      
      //qml part
      import QtQuick 2.0
      
      Rectangle {
          id:root
      }
      

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            zekses Nikolai
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes