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. qt5.15.2 QWebEngineView is slow, QWebEnginePage's print function is very slow.
QtWS25 Last Chance

qt5.15.2 QWebEngineView is slow, QWebEnginePage's print function is very slow.

Scheduled Pinned Locked Moved Unsolved QtWebEngine
3 Posts 2 Posters 1.6k 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.
  • H Offline
    H Offline
    haibianren
    wrote on last edited by
    #1

    Environment:
    QT 5.15.2 MSVC2019 32bit
    OS: window 10

    Reproduce steps:

    1. Open the printme exmaple,replace local html file with remote url (https://github.com/marketplace)

    main.cpp

    int main(int argc, char *argv[])
    {
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
        QApplication app(argc, argv);
    
        QWebEngineView view;
    
    ////////////////////////////////// modification: 
    //    view.setUrl(QUrl(QStringLiteral("qrc:/index.html"))); 
        view.setUrl(QUrl("https://github.com/marketplace"));
    ////////////////////////////////
    
        view.resize(1024, 750);
        view.show();
    
        PrintHandler handler;
        handler.setPage(view.page());
    
        auto printPreviewShortCut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_P), &view);
        auto printShortCut = new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_P), &view);
    
        QObject::connect(printPreviewShortCut, &QShortcut::activated, &handler, &PrintHandler::printPreview);
        QObject::connect(printShortCut, &QShortcut::activated, &handler, &PrintHandler::print);
    
        return app.exec();
    }
    
    1. build and run printme,it's slower to open the remote url. Press CTRL + P to preview the page to print,it takes 9-20 seconds, very slow. We tried QT5.9 to build and run printme example, it's very fast to open url, preview page to print.
    1 Reply Last reply
    0
    • H Offline
      H Offline
      haibianren
      wrote on last edited by
      #2

      well, QT5.15.0 is fast, finally we choose QT5.15.0

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mnbv
        wrote on last edited by mnbv
        #3

        Bit old but if anybody finds this post while researching this (and using MSVC), make sure you're building in release mode for performance testing. The debug libs for WebEngine take significantly longer to initialize.

        See https://forum.qt.io/topic/52360/qwebengineview-is-very-very-very-slow

        1 Reply Last reply
        1

        • Login

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