Call a C++ function from HTML in QWebEngineView, Is it Possible ?

  • Hello There
    I have a QWebEngineView to load a Web Page from local content.
    In that HTML page there is a Script include a variable "myVar", now i can get value of myVar but button click in C++,
    but my question is this:
    Is there any way to call a function in C++ whenever "myVar" changed ?
    something like this:

            var myVar = null;
            function initVar(){
                   myVar = 'sample string';
                   // now call function ( funcInCpp(myVar);)

    Is there any way to do this ? if yes please help me

  • Moderators

    see QtWebChannel module

Log in to reply