Details
Description
To reproduce
import QtQuick 2.12 import QtWebEngine 1.2 import QtQuick.Scene3D 2.15 import Qt3D.Core 2.15 import Qt3D.Render 2.15 import Qt3D.Input 2.15 import Qt3D.Extras 2.15 ApplicationWindow { id: app width: 800 height: 600 visible: true Scene3D { Entity { id: sceneRoot components: [ RenderSettings { activeFrameGraph: ForwardRenderer { clearColor: "black" } renderPolicy: RenderSettings.OnDemand }, // Event Source will be set by the Qt3DQuickWindow InputSettings { } ] } } WebEngineView { anchors.fill: parent url: "https://www.google.com" } }
I have a complex QtQuick app with lots of signal rendering. It works quite great and fast untill I add WebEngineView in. I gradually remove components until I found the problem is Scene3D
CPU usage is low, and whole QML components is functioning properly except WebEngineView is extremely slow.
Setup(PySide2 code is similar)
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QtWebEngine> int main(int argc, char *argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); QtWebEngine::initialize(); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); }