Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. WebEngine memory leak while in youtube?
Forum Updated to NodeBB v4.3 + New Features

WebEngine memory leak while in youtube?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 520 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Izba
    wrote on last edited by
    #1

    Hi all,

    I'm trying to add Youtube view in my softaware and i started noticing lagging, so i checked the taskmanager and saw that something was eating all my ram.

    I made conclusion it had something to do with WebEngine cause the ram started to get eaten when i started a video. I also made another test to make just a simple QtQuick app with only WebEngine in it with youtube as url and after clicking a video something started eating my ram again step by step until there was no ram left.

    //main.cpp
    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    #include <QtWebEngine>
    int main(int argc, char *argv[])
    {
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    
        QGuiApplication app(argc, argv);
        QtWebEngine::initialize();
        QQmlApplicationEngine engine;
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
        if (engine.rootObjects().isEmpty())
            return -1;
    
        return app.exec();
    }
    
    //main.qml
    import QtQuick 2.9
    import QtQuick.Window 2.2
    import QtWebEngine 1.5
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        WebEngineView{
            anchors.fill: parent;
            id:youtube;
            url: "http://www.youtube.com";
        }
    }
    

    Should i file a bug report or am i just doing something wrong here? I'm building this as Qt_5_10_1_MSVC2015_32bit.

    Thanks in advance,
    Izba

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved