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. QtWebEngine and QtWebChannel deployment issue
Forum Updated to NodeBB v4.3 + New Features

QtWebEngine and QtWebChannel deployment issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 534 Views 3 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.
  • C Offline
    C Offline
    carlyh
    wrote on 26 Jul 2021, 18:18 last edited by
    #1

    I'm having issues running an app after deploying it in windeployqt, while it runs fine in the QtCreator.

    Working on Windows 10, Qt 5.9.

    I have a qml file called WebRecorder that imports QtWebEngine and QtWebChannel. When I run this in QtCreator, this works without issue:

    import QtQuick 2.0
    import QtWebEngine 1.15
    import QtWebChannel 1.10
    import QtMultimedia 5.9
    

    To deploy, I run the the following command:

    C:\path>C:\Qt\5.9.9\msvc2017_64\bin\windeployqt --qmldir ..\..\src\app app.exe
    

    The app builds fine, but when I start it up it crashes on the following errors:

    qrc:/common/components/cameras/WebRecorder.qml:3 module "QtWebChannel" is not installed
    qrc:/common/components/cameras/WebRecorder.qml:2 module "QtWebEngine" is not installed
    qrc:/common/components/cameras/WebRecorder.qml:3 module "QtWebChannel" is not installed
    qrc:/common/components/cameras/WebRecorder.qml:2 module "QtWebEngine" is not installed
    

    I've tried adding "QT += webengine webchannel" to my .pro file, no luck there. Also tried different versions of the modules, nothing.
    I can see that both Qt5WebEngine.dll and QtWebChannel.dll are in the out folder, so that's something.

    Would appreciate any suggestions!

    R 1 Reply Last reply 26 Jul 2021, 21:17
    0
    • C carlyh
      26 Jul 2021, 18:18

      I'm having issues running an app after deploying it in windeployqt, while it runs fine in the QtCreator.

      Working on Windows 10, Qt 5.9.

      I have a qml file called WebRecorder that imports QtWebEngine and QtWebChannel. When I run this in QtCreator, this works without issue:

      import QtQuick 2.0
      import QtWebEngine 1.15
      import QtWebChannel 1.10
      import QtMultimedia 5.9
      

      To deploy, I run the the following command:

      C:\path>C:\Qt\5.9.9\msvc2017_64\bin\windeployqt --qmldir ..\..\src\app app.exe
      

      The app builds fine, but when I start it up it crashes on the following errors:

      qrc:/common/components/cameras/WebRecorder.qml:3 module "QtWebChannel" is not installed
      qrc:/common/components/cameras/WebRecorder.qml:2 module "QtWebEngine" is not installed
      qrc:/common/components/cameras/WebRecorder.qml:3 module "QtWebChannel" is not installed
      qrc:/common/components/cameras/WebRecorder.qml:2 module "QtWebEngine" is not installed
      

      I've tried adding "QT += webengine webchannel" to my .pro file, no luck there. Also tried different versions of the modules, nothing.
      I can see that both Qt5WebEngine.dll and QtWebChannel.dll are in the out folder, so that's something.

      Would appreciate any suggestions!

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 26 Jul 2021, 21:17 last edited by
      #2

      @carlyh
      the "--qmldir" parameter should point to the directory containing your qml files.
      You can simply point it to your projects root directory

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      C 1 Reply Last reply 26 Jul 2021, 22:13
      0
      • R raven-worx
        26 Jul 2021, 21:17

        @carlyh
        the "--qmldir" parameter should point to the directory containing your qml files.
        You can simply point it to your projects root directory

        C Offline
        C Offline
        carlyh
        wrote on 26 Jul 2021, 22:13 last edited by
        #3

        @raven-worx Thanks for the suggestion! Just tried that, no dice.

        I'm working on updating this project to 5.15, and have seeing the same issue with that version as well...

        1 Reply Last reply
        0
        • K Offline
          K Offline
          KH-219Design
          wrote on 27 Jul 2021, 17:41 last edited by
          #4

          I have seen others mention on various forum threads that they point --qmldir to the root of where the entire Qt QML distribution exists, as in:

          --qmldir C:\destination\dl_third_party\Qt_desktop\5.14.0\msvc2017_64\qml
          

          This has the side-effect (which can be "good" or "bad" depending on your opinion) of shipping ALL of Qt's QML into your deployed app (even parts of the Qt QML distro that your app does not need).

          As I understand it, this "kitchen sink" approach bypasses whatever issue is preventing windeployqt from properly analyzing your app for its minimum needed amount of Qt QML. We bypass the problem by just deploying all QML known to humankind, essentially.

          www.219design.com
          Software | Electrical | Mechanical | Product Design

          1 Reply Last reply
          0

          1/4

          26 Jul 2021, 18:18

          • Login

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