title: QQuickView content not resizing properly
body: <p>I am trying to embed a QMLview inside a QWidget. I managed to display the view inside the mainwindow without any problem, but whenever i am resizing it, the qml view is not updated.</p>
  
  <p>View not resizing properly</p>
  
  <p><img src="https://i.stack.imgur.com/g6Rej.png" alt=""></p>
  
  <p>Here is the code which draws that view</p>
  
  <p>mainwindow.cpp</p>
  
  <pre><code>MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
  {
    ui-&gt;setupUi(this);
  
    QQuickView * view = new QQuickView ();
    view-&gt;setSource (QUrl ("qrc:///main//qml-map") );
    view-&gt;setResizeMode (QQuickView::SizeRootObjectToView);
  
    QWidget * container = QWidget::createWindowContainer(view, this);
  
    setCentralWidget(container);
  }
  </code></pre>
  
  <p>main.qml</p>
  
  <pre><code>Item {
    anchors.fill: parent
    visible: true
  
    Plugin {
      id: osmPlugin
      name: "osm"
    }
  
    Map {
      visible: true
      anchors.fill: parent
      plugin: osmPlugin
      center: QtPositioning.coordinate(59.91, 10.75) // Oslo
      zoomLevel: 10
    }
  }
  </code></pre>
  
  <p>I also tried to put the container using the setLayout function, but it didn't do the trick.</p>