Important: Please read the Qt Code of Conduct -

Invoke JavaScript callback from QT with structure/object argument

  • Hi,

    I am using QT 5.5 version.

    I need to invoke javascript callback function from QT plugin with Structure/Object as argument. I could not modify HTML Application since it is not in our scope.

    HTML application code snippet

    var obj1 = document.getElementById('obj1_id'); //QT plugin object 1
    var obj2 = document.getElementById('obj2_id'); //QT plugin object 2

    obj2.init(obj1,callback); //QT API

    function callback(arg1)
    if ( obj1 === arg1){
    // SUCCESS
    // FAILURE

    QT plugin code snippet

    class::init(QWebElement obj, QString callback)
    //need to Invoke callback with obj argument

    Can any one help me on this?

Log in to reply