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. Access WebEngineView from C++
Forum Updated to NodeBB v4.3 + New Features

Access WebEngineView from C++

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 938 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.
  • S Offline
    S Offline
    scotryder
    wrote on last edited by
    #1

    Hi there,

    How can i access QML based WebEngineView from C++? I want to do that so i can do my UI in QML while do business logic in C++ with direct access to WebEngineView.

    Please advise
    Thanks

    1 Reply Last reply
    1
    • E Offline
      E Offline
      Estereta
      wrote on last edited by
      #2

      Hi,

      I found the answer here:
      https://stackoverflow.com/questions/21133817/access-qml-webview-from-c

      In short:
      In the .pro file:
      QT += quick quick-private webengine webengine-private webenginecore webenginecore-private

      In the qml file:
      WebEngineView {
      id: webEngineView
      objectName: "webEngineView"

      In the c++ file:
      QQuickWebEngineView webEngineView = view.rootObject()->findChild<QQuickWebEngineView>("webEngineView");

      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