Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. How Can Call C++ Function in WebView Javascript?

How Can Call C++ Function in WebView Javascript?

Scheduled Pinned Locked Moved Unsolved Qt WebKit
webkitjavascript
2 Posts 2 Posters 2.6k 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.
  • B Offline
    B Offline
    BurzoM
    wrote on 7 Jun 2016, 05:20 last edited by
    #1

    Hi,
    I have webView that connect to server and run a html page I need to share function to to be callable inside javascript .
    How can i do this ?

    K 1 Reply Last reply 28 Jun 2016, 14:38
    0
    • B BurzoM
      7 Jun 2016, 05:20

      Hi,
      I have webView that connect to server and run a html page I need to share function to to be callable inside javascript .
      How can i do this ?

      K Offline
      K Offline
      Konstantin Tokarev
      wrote on 28 Jun 2016, 14:38 last edited by
      #2

      Use QObject bridge:

      http://doc.qt.io/qt-4.8/qtwebkit-bridge.html

      After you add qobject-derived object to JS you can call its slots, signals or invocable methods

      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