Solved QWebChannel compatibility problems
-
I tried to use the chat example with the following configuration:
Complier : MinGW 5.3.0 32bit
Qt version : Qt 5.7 MinGW 32bitThe example works fine with the configuration above.
My problem is that as soon as i use the following configuration :
Compiler : Microsoft Visual c++ Complier 10.0 (x86)
Qt version : Qt 5.4.1 (msvc2010_opengl)The browser consoler returns the following error when i reload the chatclient.html file :
/invalid message received: {"data":{"chatserver":{"methods":[["deleteLater",3],["login",11],["logout",12],["sendMessage",13],["keepAliveResponse",14]],"properties":[[0,"objectName",[1,2],""],[1,"userList",[1,7],[]]],"signals":[["destroyed",0],["newMessage",5],["keepAlive",6],["userCountChanged",8]]}},"type":3} QWebChannel.transport.onmessage @ qwebchannel.js:92
I used the exact same code with both configurations. Any suggestions how to fix this problem ??
-
Hi and welcome to devnet,
As silly as it may sound: use the same version of Qt ? You are comparing 5.7 and 5.4.1, which makes a big delta. You should rather check the equivalent Qt 5.7 for visual studio.
-
@SGaist i cant really do that cause in the project i am planning to do i rely on other stuff thats needs to be complied with msvc2010
-
In that case, you should go with the latest version of Qt still compilable with VS2010, which is likely 5.6 and is an LTS release.
-
@SGaist Can you send me a download link i cant find it on : https://www.qt.io/download-open-source/#section-2
-
@gpioloco
hi i could only find
http://download.qt.io/archive/qt/5.5/5.5.1/qt-opensource-windows-x86-msvc2010-5.5.1.exePlease have a look
http://download.qt.io/archive/qt/ -
@mrjj THANK YOU !
The version you linked worked