Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Reload QQuickView into the same window container
Rem-Kolomna last edited by Rem-Kolomna
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?
Rem-Kolomna last edited by
Thank you, QQuickWidget is a solution for my problem