Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. failed to load component after deploying Qt application on Windows using windeployqt
Forum Updated to NodeBB v4.3 + New Features

failed to load component after deploying Qt application on Windows using windeployqt

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 867 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.
  • S Offline
    S Offline
    Sachin Gaikwad
    wrote on last edited by
    #1

    I recently converted my Qt application to run on Windows as a standalone application using the windeployqt tool.
    However, upon running the generated executable, I encountered the following error in the log:

    QQmlApplicationEngine failed to load component
    qrc:/main.qml:18:1: module "QtQuick.Controls" is not installed
    qrc:/main.qml:17:1: module "QtQuick" is not installed
    qrc:/main.qml:18:1: module "QtQuick.Controls" is not installed
    qrc:/main.qml:17:1: module "QtQuick" is not installed

    This error seems to indicate that the required QtQuick and QtQuick.Controls modules are missing. I have verified that the application runs successfully in my development environment Qt Creator .

    Could anyone provide insights into how to resolve this issue?
    Has anyone encountered similar problems when deploying Qt applications on Windows using windeployqt?
    Any suggestions or solutions would be greatly appreciated. Thank you.

    A 1 Reply Last reply
    0
    • S Sachin Gaikwad

      I recently converted my Qt application to run on Windows as a standalone application using the windeployqt tool.
      However, upon running the generated executable, I encountered the following error in the log:

      QQmlApplicationEngine failed to load component
      qrc:/main.qml:18:1: module "QtQuick.Controls" is not installed
      qrc:/main.qml:17:1: module "QtQuick" is not installed
      qrc:/main.qml:18:1: module "QtQuick.Controls" is not installed
      qrc:/main.qml:17:1: module "QtQuick" is not installed

      This error seems to indicate that the required QtQuick and QtQuick.Controls modules are missing. I have verified that the application runs successfully in my development environment Qt Creator .

      Could anyone provide insights into how to resolve this issue?
      Has anyone encountered similar problems when deploying Qt applications on Windows using windeployqt?
      Any suggestions or solutions would be greatly appreciated. Thank you.

      A Offline
      A Offline
      afalsa
      wrote on last edited by
      #2

      @Sachin-Gaikwad

      Hello! Could you share the windeploy command you have used to do that? Or at least the --options used

      This error seems to indicate that the required QtQuick and QtQuick.Controls modules are missing. I have verified that the application runs successfully in my development environment Qt Creator .
      

      That is because Qt Creator is linked internally to those modules (you can see them under <QT_DIR\qml>

      To avoid those errors you can:

      • Copy missing modules manually from QT_DIR/qml to your release folder ( I dont recommend this)
      • Add the --qmldir . option to the windeployqt command (I am not sure about this as i havent seen your command)

      Windeploy Doc

      windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>
      windeployqt.exe --qmldir . --release <my_release_folder>\myapp.exe
      
      S 1 Reply Last reply
      0
      • A afalsa

        @Sachin-Gaikwad

        Hello! Could you share the windeploy command you have used to do that? Or at least the --options used

        This error seems to indicate that the required QtQuick and QtQuick.Controls modules are missing. I have verified that the application runs successfully in my development environment Qt Creator .
        

        That is because Qt Creator is linked internally to those modules (you can see them under <QT_DIR\qml>

        To avoid those errors you can:

        • Copy missing modules manually from QT_DIR/qml to your release folder ( I dont recommend this)
        • Add the --qmldir . option to the windeployqt command (I am not sure about this as i havent seen your command)

        Windeploy Doc

        windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>
        windeployqt.exe --qmldir . --release <my_release_folder>\myapp.exe
        
        S Offline
        S Offline
        Sachin Gaikwad
        wrote on last edited by
        #3

        @afalsa Thanks for the solution . it works now I am getting this log QQmlApplicationEngine failed to load component
        qrc:/main.qml:252:17: Type View_PdfFile unavailable
        qrc:/View_PdfFile.qml:4:1: module "QtWebView" is not installed

        I installed manually the Qt webView but still it gives the same error

        Ronel_qtmasterR A 2 Replies Last reply
        0
        • S Sachin Gaikwad

          @afalsa Thanks for the solution . it works now I am getting this log QQmlApplicationEngine failed to load component
          qrc:/main.qml:252:17: Type View_PdfFile unavailable
          qrc:/View_PdfFile.qml:4:1: module "QtWebView" is not installed

          I installed manually the Qt webView but still it gives the same error

          Ronel_qtmasterR Offline
          Ronel_qtmasterR Offline
          Ronel_qtmaster
          wrote on last edited by
          #4

          @Sachin-Gaikwad Hi.QtWebView is only for Android now.You should use WebEngine Instead.

          1 Reply Last reply
          1
          • S Sachin Gaikwad

            @afalsa Thanks for the solution . it works now I am getting this log QQmlApplicationEngine failed to load component
            qrc:/main.qml:252:17: Type View_PdfFile unavailable
            qrc:/View_PdfFile.qml:4:1: module "QtWebView" is not installed

            I installed manually the Qt webView but still it gives the same error

            A Offline
            A Offline
            afalsa
            wrote on last edited by afalsa
            #5

            @Sachin-Gaikwad

            Good news!

            You can try to add this to the windeployqt command:

            windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary> -webview -webengine 
            windeployqt.exe --qmldir . --release <my_release_folder>\myapp.exe -webview -webengine 
            

            Please check better the documentation link I added above since what I am telling you is indicated at the bottom:

            Qt libraries can be added by passing their name (-xml) or removed by passing
            the name prepended by --no- (--no-xml). Available libraries:
            bluetooth concurrent core declarative designer designercomponents gui qthelp
            multimedia multimediawidgets multimediaquick network nfc opengl openglwidgets
            positioning printsupport qml qmltooling quick quickparticles quickwidgets script
            scripttools sensors serialport sql svg svgwidgets test websockets widgets xml
            webenginecore webengine webenginewidgets 3dcore 3drenderer 3dquick
            3dquickrenderer 3dinput 3danimation 3dextras geoservices webchannel serialbus
            webview
            

            In the end, all errors of this type should have the same solution as the one mentioned above.

            S 1 Reply Last reply
            0
            • A afalsa

              @Sachin-Gaikwad

              Good news!

              You can try to add this to the windeployqt command:

              windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary> -webview -webengine 
              windeployqt.exe --qmldir . --release <my_release_folder>\myapp.exe -webview -webengine 
              

              Please check better the documentation link I added above since what I am telling you is indicated at the bottom:

              Qt libraries can be added by passing their name (-xml) or removed by passing
              the name prepended by --no- (--no-xml). Available libraries:
              bluetooth concurrent core declarative designer designercomponents gui qthelp
              multimedia multimediawidgets multimediaquick network nfc opengl openglwidgets
              positioning printsupport qml qmltooling quick quickparticles quickwidgets script
              scripttools sensors serialport sql svg svgwidgets test websockets widgets xml
              webenginecore webengine webenginewidgets 3dcore 3drenderer 3dquick
              3dquickrenderer 3dinput 3danimation 3dextras geoservices webchannel serialbus
              webview
              

              In the end, all errors of this type should have the same solution as the one mentioned above.

              S Offline
              S Offline
              Sachin Gaikwad
              wrote on last edited by
              #6

              @afalsa Thanks it works now.

              A 1 Reply Last reply
              0
              • S Sachin Gaikwad

                @afalsa Thanks it works now.

                A Offline
                A Offline
                afalsa
                wrote on last edited by
                #7

                @Sachin-Gaikwad

                Great! You can now mark this as solved!

                Cheers

                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