QT5.4 webchannel
-
Hello everybody,
I just download the last version of qt 5.4 and i would like to try the standalone exemple for qwebchannel.
During the compilation i have the error:
:-1: erreur : [qwebchannel.js] Error 1The exampleassets.pri talk about a qwebchannel.js file but the is not this file in the source.
Is there a way to make this example work.
JC -
Hi and welcome to devnet,
That file should be found in src/webchannel/qwebchannels.js
-
You'll have to be more specific, what doesn't work ?
-
Hi,
I just started my journey with QT and I stump on this. It looks like it is bug in windows version uri lunching with file schema and additional query. If uri is lunched as file it appears in browser as:
file:///C:/Qt/Examples/Qt-5.4/webchannel/build-standalone-Desktop_Qt_5_4_0_MSVC2013_64bit-Debug/index.html
and browser console reports
index.html:14 Uncaught TypeError: Cannot read property '1' of null
as webChannelBaseUrl wasn't transfered
but if you force scheme to http browser opens:
so Query was respected this time
Regards,
Pawel
Look also here:
http://qt-project.org/forums/viewthread/45654
http://www.qtforum.org/article/35875/qdesktopservices-openurl-with-location-hash-fails-on-windows.html -
first off, not every standard installation seems to contain qwebchannel.js
my Mac-Clang version did not have that so I had to download from"qt.gitorious.org":https://qt.gitorious.org/qt/qtwebchannel/source/3ed29bca08dec484003cf573dd428b73627ffa81:src/webchannel
and put it inside 'standalone' directory
second problem I ran into was, after qmake - build all - run,
My Safari console shows:
TypeError: null is not an object (evaluating '/[?&]webChannelBaseUrl=([A-Za-z0-9-:/.]+)/.exec(location.search)[1]')
which stops the chat client form working.
I think this pretty much covers the problems with the example.