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. Do I really have to deploy 700 files with my QML application?
Forum Update on Monday, May 27th 2025

Do I really have to deploy 700 files with my QML application?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qmldeploymentdependenciesqtquickwindeployqt
11 Posts 5 Posters 1.5k Views
  • 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
    JoeCFD
    wrote on 25 May 2021, 17:03 last edited by
    #2

    use qrc to store qml files which are not needed to be included in deployment.

    D 1 Reply Last reply 25 May 2021, 17:09
    0
    • J JoeCFD
      25 May 2021, 17:03

      use qrc to store qml files which are not needed to be included in deployment.

      D Offline
      D Offline
      David_S
      wrote on 25 May 2021, 17:09 last edited by
      #3

      @JoeCFD I am using qrc to store my QML files. These are files like "ApplicationWindow.qml" "ComboBox.qml" etc. Part of Qt infrastructure; not stuff I wrote. Are you saying there is a way to get all of this packaged in the qrc?

      J 1 Reply Last reply 25 May 2021, 17:11
      0
      • D David_S
        25 May 2021, 17:09

        @JoeCFD I am using qrc to store my QML files. These are files like "ApplicationWindow.qml" "ComboBox.qml" etc. Part of Qt infrastructure; not stuff I wrote. Are you saying there is a way to get all of this packaged in the qrc?

        J Offline
        J Offline
        JoeCFD
        wrote on 25 May 2021, 17:11 last edited by JoeCFD
        #4

        @David_S right. Put all of them into one qrc file. Use qml files from qrc. Then they will not be needed for deployment. Same as ui files.

        D R 2 Replies Last reply 25 May 2021, 17:29
        0
        • J JoeCFD
          25 May 2021, 17:11

          @David_S right. Put all of them into one qrc file. Use qml files from qrc. Then they will not be needed for deployment. Same as ui files.

          D Offline
          D Offline
          David_S
          wrote on 25 May 2021, 17:29 last edited by
          #5

          @JoeCFD Is there a utility to do this? There are literally over 700 files in nested folders.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 25 May 2021, 18:21 last edited by
            #6

            Hi and welcome to devnet,

            How many different QtQuick modules are you using ?
            Maybe a silly question but did you point qmldir to your application sources ?

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

            D 1 Reply Last reply 25 May 2021, 19:19
            0
            • S SGaist
              25 May 2021, 18:21

              Hi and welcome to devnet,

              How many different QtQuick modules are you using ?
              Maybe a silly question but did you point qmldir to your application sources ?

              D Offline
              D Offline
              David_S
              wrote on 25 May 2021, 19:19 last edited by David_S
              #7

              @SGaist Thanks.
              I only have one QML file and it imports
              QtQuick 2.12
              QtQuick.Window 2.12
              QtQuick.Controls 2.12
              QtQuick.Layouts 1.3
              QtQuick.Dialogs 1.0

              The rest is C++.

              I pointed the --qmldir to my source code directory.

              So I take it this is uncommon?

              1 Reply Last reply
              0
              • J JoeCFD
                25 May 2021, 17:11

                @David_S right. Put all of them into one qrc file. Use qml files from qrc. Then they will not be needed for deployment. Same as ui files.

                R Offline
                R Offline
                raven-worx
                Moderators
                wrote on 25 May 2021, 19:29 last edited by raven-worx
                #8

                @JoeCFD said in Do I really have to deploy 700 files with my QML application?:

                @David_S right. Put all of them into one qrc file. Use qml files from qrc. Then they will not be needed for deployment. Same as ui files.

                omg, just dont do it.... how can you give such a terrible advise?!
                Beside that it wont work anyway afterall ...

                --- 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

                1 Reply Last reply
                1
                • D Offline
                  D Offline
                  David_S
                  wrote on 26 May 2021, 13:22 last edited by
                  #9

                  I built the "Qt Quick Layouts - Basic Example" in release and then ran windeployqt on it. It pulled in almost 450 files. So I guess this is something we just have to deal with when deploying QML?

                  J 1 Reply Last reply 27 May 2021, 06:43
                  0
                  • D David_S
                    26 May 2021, 13:22

                    I built the "Qt Quick Layouts - Basic Example" in release and then ran windeployqt on it. It pulled in almost 450 files. So I guess this is something we just have to deal with when deploying QML?

                    J Offline
                    J Offline
                    J.Hilk
                    Moderators
                    wrote on 27 May 2021, 06:43 last edited by J.Hilk
                    #10

                    @David_S The thing is, the windepolyqt tool is not perfect.

                    it will parse your project, it sees Oh you're using layouts! Let me get EVERYTHING layout related! when in fact, you only use it for one row layout or something.

                    The tool errors on the side of caution. Same with dlls actually, Oh, you're loading an Image, let me get all the image formats dll's even if you only use pngs!

                    It gets the job done, you hardly ever have to add something from the Qt directory by hand, when you used the tool(correctly)

                    On the up side: Your application folder, from now on, will hardly grow bigger, compared to its current size. As long as you do not add additional modules or such.

                    On the down side: If you actually want to ship a minimalistic folder, you'll have to manually check the content folder and remove unneeded stuff.

                    Make sure to test the application after each removal. The problem with this is also, that a bunch of QML stuff is not loaded/needed on start up and you may only later on, notice this, deep inside the application on page 215 when 20 other conditions are met.

                    So, be cautious!


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    D 1 Reply Last reply 2 Jun 2021, 13:25
                    3
                    • J J.Hilk
                      27 May 2021, 06:43

                      @David_S The thing is, the windepolyqt tool is not perfect.

                      it will parse your project, it sees Oh you're using layouts! Let me get EVERYTHING layout related! when in fact, you only use it for one row layout or something.

                      The tool errors on the side of caution. Same with dlls actually, Oh, you're loading an Image, let me get all the image formats dll's even if you only use pngs!

                      It gets the job done, you hardly ever have to add something from the Qt directory by hand, when you used the tool(correctly)

                      On the up side: Your application folder, from now on, will hardly grow bigger, compared to its current size. As long as you do not add additional modules or such.

                      On the down side: If you actually want to ship a minimalistic folder, you'll have to manually check the content folder and remove unneeded stuff.

                      Make sure to test the application after each removal. The problem with this is also, that a bunch of QML stuff is not loaded/needed on start up and you may only later on, notice this, deep inside the application on page 215 when 20 other conditions are met.

                      So, be cautious!

                      D Offline
                      D Offline
                      David_S
                      wrote on 2 Jun 2021, 13:25 last edited by
                      #11

                      @J-Hilk Thanks for the reply. This adds a bit of complexity to my WIX installer since I don't want to list all 700+ files individually. Do you know if there is anyway to deploy these files in a folder other than where the executable is located? I would like to dump all of the QT dependencies in one folder (which can have subfolders) but I need to be able to "blow away" all of the Qt related dependencies by deleting one directory while being confident that I didn't delete anything but Qt dependencies.

                      1 Reply Last reply
                      0

                      11/11

                      2 Jun 2021, 13:25

                      • Login

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