[Interest] qtwebview with qtwebchannel

Sylvain Pointeau sylvain.pointeau at gmail.com
Sun Sep 16 12:58:07 CEST 2018


Le dim. 16 sept. 2018 à 12:22, Artem Sidyakin <artem.sidyakin at qt.io> a
écrit :

> Original question was about “communication between WebView and QML on
> iOS”, which does work, as we can see.
> Now there is an issue of loading HTML documents from file/resource system,
> but that’s a different kind of issue, innit (which I also would like to get
> to the bottom of).
>
> > you confirm that the webchannel is working if the page is loaded from a
> server
>
> Indeed, but what difference does it make? After the page is downloaded
> from the server it is run locally in the WebView on device.


ajax for instance does not work when the file is loaded from the
filesystem. I suppose there is a limitation on the websocket accessing
localhost. I also suppose this can be for security reason?

>
>
> Now, when you say
>
> > unfortunately it does not work on the physical ipad
>
> how exactly it does not work? Page is not loaded in the WebView? Or it is
> loaded (input field and button), but when you click the button nothing
> happens? If it’s the latter, then I would guess that qwebchannel.js is not
> loaded properly (wrong path, etc).


When I click on the button, nothing happens, and I suppose that
qwebchannel.js is correctly loaded (it is in the same folder than the
index.html)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180916/4ec8fd69/attachment.html>


More information about the Interest mailing list