To resize the top-level item to the view’s size, use QQuickView::setResizeMode():
view.setResizeMode(QQuickView::SizeRootObjectToView);
That overrides any width/height set on the top-level QML item. For non-top-level items use
anchors.fill: parent
On Android, setting the resize mode should suffice. On other platforms, you might have to explicitely show the view in fullscreen:
view.showFullscreen();