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. QQuickView and QWebEngineView
Forum Update on Monday, May 27th 2025

QQuickView and QWebEngineView

Scheduled Pinned Locked Moved General and Desktop
qquickitemqwebengineview
1 Posts 1 Posters 1.3k 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.
  • E Offline
    E Offline
    ejos
    wrote on 8 May 2015, 12:21 last edited by
    #1

    I am porting from QDeclarativeView/QGraphicsWebView to QQuickView/QWebEngineView
    I find here that QQuickView is QWindow type and QWebEngineView is QWidget type.

    QQuickView , I am making use of extensively to enable the QML functionalities.
    To display the page alone, QWebEngineView I am using and also for actions made on that page like highlight, annotation, search, mouseWheelRoll etc.

    Is it possible to overlay QWebEngineView on QQuickView just like we do in QGraphicsWebView on QDeclarativeView.

    I have just made the object of the WebEngineView in the constructor of QuickView. But page is displayed blank. When I explicitly call WebEngineView.show(), the page is displayed on the WebEngineView.

    QuickViewReader::QuickViewReader(QWindow *parent): QQuickView(parent)
    {
    WebView = new WebEngineView();

    //root = this->rootContext();
    root = new QQmlContext(engine.rootContext());
    qmlRegisterType<WebEngineView>("WebView", 1,0, "WebEngineView");
    

    /* Setting the current object into context of QML source /
    root->setContextProperty("rw", this);
    this->rootContext()->setContextProperty("rw", this);
    /
    Setting the webview object into context of QML source */
    root->setContextProperty("webView",this->WebView);

    QQmlComponent component(&engine);
    component.loadUrl(QUrl("qrc:/ReaderView.qml"));
    object = component.create(root);

    setSource(QUrl("qrc:/ReaderView.qml"));
    setResizeMode(QQuickView::SizeRootObjectToView);
    }

    1 Reply Last reply
    0

    1/1

    8 May 2015, 12:21

    • 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