Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT5.4 webchannel

QT5.4 webchannel

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jc19000
    wrote on last edited by
    #1

    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 1

    The 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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      That file should be found in src/webchannel/qwebchannels.js

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jc19000
        wrote on last edited by
        #3

        It's not in the windows mingw version.

        So i download the split package qtwebchannel-opensource-src-5.4.0.zip
        There is no error in compilation but it doesn't work :(

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You'll have to be more specific, what doesn't work ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            phryniszak
            wrote on last edited by
            #5

            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:

            http://c/Qt/Examples/Qt-5.4/webchannel/build-standalone-Desktop_Qt_5_4_0_MSVC2013_64bit-Debug/index.html?webChannelBaseUrl=ws://127.0.0.1:12345

            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

            1 Reply Last reply
            0
            • T Offline
              T Offline
              thebeast44
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved