Hi Milian,

when using the qwebchannel.js file to implement a client one can set a URL so that the QWebChannel object opens a websocket connection to that URL or just set an already connected socket right? But I'm thinking about setting a socket object that already has a send function, that will break my socket object (if I'm not doing some extra work) because QWebChannel sets the send property w/o checking if it already exists. I think there should be done some extra checks to make sure that the object you set the send function on is that WebView communication thing.

Lutz

On 07/04/2014 11:36 AM, Milian Wolff wrote:
On Friday 04 July 2014 11:11:13 Bernd Lamecker wrote:
Hi,

do you plan to use QtWebChannel only "locally" or will it be possible to use
the javascript part to connect a pure QML client to an QObject backend or
maybe even use the javascript to connect a NodeJS server to a QObject?
Hey,

the plan for 5.4 is to ensure it works well with WebView (and hopefully
WebEngine as well) - so locally. But thanks to WebSockets, you can talk to
arbitrary remote clients as long as they support WebSockets. NodeJS should
thus be pretty trivial, I simply never tried it out so far but I don't see any
problem with that.

Regarding QML client and QObject backend, that should work the same way. I
just refactored the code yesterday and ported the unit tests such that they
run the qwebchannel.js code inside V4. So you can setup a JS web channel in
QML just fine and get objects somehow, e.g. again via websockets. What's
missing here is an implementation or auto-wrapper of QQmlWebSocket for
QWebChannelAbstractTransport. That's trivial to do though.

Bye



_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to