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 Updated to NodeBB v4.3 + New Features

QQuickView and QWebEngineView

Scheduled Pinned Locked Moved General and Desktop
qquickitemqwebengineview
1 Posts 1 Posters 1.3k Views 1 Watching
  • 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 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

    • Login

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