Can't get QWebchannel demos to work
-
Using VS2013 (or QtCreator) , Win 7 64 bit. Using ChatServer and ChatClient-html. Start the server, then start chatclient.html in Chrome. I can type in a name in the client and press login, nothing shows up in the console window except "Keep Alive Check()". The client "Users" list doesn't change. If I put breakpoints in the server (when running on VS2013), I can see lots of activity. But after the server sendMessage() function, if I catch this in Chrome in qwebchannel.js in the "this.transport.onmessage = function (message)" method, it always goes to the default case and prints out "invalid message received". The message sent was something like "{"data":{"chatserver":{"methods":[["deleteLater",3], ["login", 11], ...". This looks reasonable to me.
Has anyone got the demos to work on Windows? Any tips? Or wait for 5.4.1?
-
hi, You need download qwebchannel.js file from qt "5.4" branch, not "dev".
https://github.com/qtproject/qtwebchannel/tree/5.4/src/webchannel