Reload QQuickView into the same window container
I want to write plugins to my program as qml displaying inside dock widget
I load plugin this way:
if (!qview) qview = new QQuickView(); qview->engine()->clearComponentCache(); qview->setSource(QUrl(path)); QQuickItem *item_main = qview->rootObject(); QWindow* main_page = item_main->window(); auto container = QWidget::createWindowContainer( main_page, ui->dockWidgetContents ); container->show();
It works ok, but reloading plugin is quite slow. I think it is because createWindowContainer creates native window each time.
Can I speed up loading by forcing QQuickView use the same window container after reload?
Thank you, QQuickWidget is a solution for my problem