Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt/QML: WebView resizes really slowly when window resizing
Forum Updated to NodeBB v4.3 + New Features

Qt/QML: WebView resizes really slowly when window resizing

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 788 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.
  • D Offline
    D Offline
    Diego Donate
    wrote on 30 May 2016, 14:14 last edited by
    #1

    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

    1 Reply Last reply
    3

    1/1

    30 May 2016, 14:14

    • Login

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