Important: Please read the Qt Code of Conduct -

Problem in exposing nested COM interfaces to QtWebKit via QAxObject

  • How to expose a nested com interface to QtWebKit?

    For example I want to execute the following JavaScript code in the QtWebKit with as small changes as possible.

    @var obj = new ActiveXObject("Excel.Application");
    obj.Autorecover.Time = 77;@

    Using the QtWebKit bridge and QAxObject wrapper I am able to expose the "Excel.Application" COM interface to webkit's JavaScript environment. I am able to access all the methods of "Excel.Application" and all the properties except the ones which have a type IDispatch* . In the above example "Autorecover" itself is a sub-interface of "Excel.Application" but JavaScript environment interprets it only as a string and I am not able to call any methods or access any properties of "Autorecover".

    Ideally I would like to be able to run the following script in QtWebkit:

    @var obj = ExposedClass.getActiveXObject("Excel.Application"); // ExposedClass is exposed via addToJavaScriptWindowObject
    obj.Autorecover.Time = 77;@


Log in to reply