Qt/QML: WebView resizes really slowly when window resizing



  • Hi,

    I have a Qt application with QML and I need to display a webBrowser inside a QML file.

    I have tried with Qml (using 'WebEngineView - QtWebEngine 1.1' or 'WebView - QtWebView 1.0') and in Qt (using 'QWebEngineView - Qt 5.6', with or without 'QWebEnginePage')

    The HTML is loaded properly, but when I resize the window, the content (including the scroll bar) is resized slowly to the new window size, so it has a really bad effect.

    My code is like that:

    1. QML:
    
    Item {
        id: rectChatView
    
        anchors.fill: parent
        ...
        WebEngineView  // or WebView
        {
            id: chatView
            anchors.fill: parent
            url: "file:///d:\\test.html"
        }
        ...
    }
    
    1. Qt

    With QWebEngineView:

        QWebEngineView* pViewWeb = new QWebEngineView();
        pViewWeb->setWindowTitle("QWebEngineView");
        pViewWeb->load(QUrl("file:///d:\\test.html"));
        pViewWeb->setMinimumSize(300,300);
        pViewWeb->show();
    

    or with QWebEnginePage:

        QWebEnginePage* pPage = new QWebEnginePage();
        pPage->load(QUrl("file:///d:\\test.html"));
    
    
        QWebEngineView* pView = new QWebEngineView();
        pView->setWindowTitle("QWebEngineView");
        pView->setMinimumSize(300,300);
        pView->setPage(pPage);
        pView->show();
    

    But the 3 ways have the same result, too slow when resizing the window...

    Any ideas? Thanks a lot in advance

    Diego


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.