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. Running a QML .exe file on Windows

Running a QML .exe file on Windows

Scheduled Pinned Locked Moved Solved General and Desktop
31 Posts 9 Posters 8.3k 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.
  • C Offline
    C Offline
    Crawl.W
    wrote on 5 May 2019, 06:33 last edited by
    #15

    @kenchan My program haven't arguments need to pass. I will read your post linkage carefully and refine some answers here.

    K 1 Reply Last reply 5 May 2019, 15:00
    0
    • C Crawl.W
      5 May 2019, 06:33

      @kenchan My program haven't arguments need to pass. I will read your post linkage carefully and refine some answers here.

      K Offline
      K Offline
      KillerSmath
      wrote on 5 May 2019, 15:00 last edited by
      #16

      @Crawl.W
      Kenchan has mentioded the deploy tool arguments.

      Windeployqt does'nt know if you are deploying an qml application, so you need to pass --qmldir [your qml root path folder] argument

      Note: if your qml root path folder has space characters, you should use double quotes between your path or it will interpret as Different Commands.

      @Computer Science Student - Brazil
      Web Developer and Researcher
      “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

      C 1 Reply Last reply 6 May 2019, 01:28
      2
      • K KillerSmath
        5 May 2019, 15:00

        @Crawl.W
        Kenchan has mentioded the deploy tool arguments.

        Windeployqt does'nt know if you are deploying an qml application, so you need to pass --qmldir [your qml root path folder] argument

        Note: if your qml root path folder has space characters, you should use double quotes between your path or it will interpret as Different Commands.

        C Offline
        C Offline
        Crawl.W
        wrote on 6 May 2019, 01:28 last edited by Crawl.W 5 Jun 2019, 01:33
        #17

        @KillerSmath @kenchan I found my posting linkage of stackoverflow is invalid, I update it just now, Here(https://stackoverflow.com/questions/44762836/deploying-qt-c-qml-application-on-windows/55850012#55850012). My problem seems to need some non-dynamic library(DLL), and runtime is unoccupied. Kind of weird. I had already run my program and then I wanna know that's about what.

        K 1 Reply Last reply 6 May 2019, 01:38
        0
        • C Crawl.W
          6 May 2019, 01:28

          @KillerSmath @kenchan I found my posting linkage of stackoverflow is invalid, I update it just now, Here(https://stackoverflow.com/questions/44762836/deploying-qt-c-qml-application-on-windows/55850012#55850012). My problem seems to need some non-dynamic library(DLL), and runtime is unoccupied. Kind of weird. I had already run my program and then I wanna know that's about what.

          K Offline
          K Offline
          KillerSmath
          wrote on 6 May 2019, 01:38 last edited by KillerSmath 5 Jun 2019, 01:39
          #18

          @Crawl.W
          If your apllication is running on test environment, so the windeployqt should able to identify and copy the dependent dlls.
          Keep in mind, you also can use --force parameter to copy the dependencies even though they already exist on deploy folder.

          @Computer Science Student - Brazil
          Web Developer and Researcher
          “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

          C 1 Reply Last reply 6 May 2019, 01:52
          0
          • K KillerSmath
            6 May 2019, 01:38

            @Crawl.W
            If your apllication is running on test environment, so the windeployqt should able to identify and copy the dependent dlls.
            Keep in mind, you also can use --force parameter to copy the dependencies even though they already exist on deploy folder.

            C Offline
            C Offline
            Crawl.W
            wrote on 6 May 2019, 01:52 last edited by
            #19

            @KillerSmath I have tried --qmldir [your qml root path folder], deployed program is still not work.

            K 1 Reply Last reply 6 May 2019, 01:56
            0
            • C Crawl.W
              6 May 2019, 01:52

              @KillerSmath I have tried --qmldir [your qml root path folder], deployed program is still not work.

              K Offline
              K Offline
              KillerSmath
              wrote on 6 May 2019, 01:56 last edited by
              #20

              @Crawl.W
              Can you show a detailed command example ?

              @Computer Science Student - Brazil
              Web Developer and Researcher
              “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

              C 1 Reply Last reply 6 May 2019, 02:09
              0
              • K KillerSmath
                6 May 2019, 01:56

                @Crawl.W
                Can you show a detailed command example ?

                C Offline
                C Offline
                Crawl.W
                wrote on 6 May 2019, 02:09 last edited by Crawl.W 5 Jun 2019, 02:10
                #21

                @KillerSmath windeployqt --qmldir D:\Qt\Qt5.12.0\5.12.0\msvc2017_64\qml ImWorkStation.exe What I can confirm now is my program need to depend on some unoccupied non-dll at runtime, which exits in qmldir.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  KillerSmath
                  wrote on 6 May 2019, 02:39 last edited by KillerSmath 5 Jun 2019, 02:41
                  #22

                  @Crawl.W
                  When i said [your qml root path folder], it means your project folder path where are your qml files.

                  Example:
                  D:\MyProject\qml
                  D:\MyProject

                  Note: Use --force parameter if you already have old deploy files.

                  @Computer Science Student - Brazil
                  Web Developer and Researcher
                  “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

                  C 1 Reply Last reply 6 May 2019, 06:21
                  3
                  • K KillerSmath
                    6 May 2019, 02:39

                    @Crawl.W
                    When i said [your qml root path folder], it means your project folder path where are your qml files.

                    Example:
                    D:\MyProject\qml
                    D:\MyProject

                    Note: Use --force parameter if you already have old deploy files.

                    C Offline
                    C Offline
                    Crawl.W
                    wrote on 6 May 2019, 06:21 last edited by Crawl.W 5 Jun 2019, 06:23
                    #23

                    @KillerSmath Good, I changed to where my project's qml file is located, it works. You rocks!
                    I might have three more questions:

                    • if my project's qml file locate two folder, how I should pass directory?
                    • just because the qml file needs to do this?
                    • Always confused. What are the non-occupied dependencies at runtime but is must when startup? I am targeting two folders: QtQuick\Controls and QtQuick\Extras
                    K 1 Reply Last reply 6 May 2019, 07:39
                    0
                    • C Crawl.W
                      6 May 2019, 06:21

                      @KillerSmath Good, I changed to where my project's qml file is located, it works. You rocks!
                      I might have three more questions:

                      • if my project's qml file locate two folder, how I should pass directory?
                      • just because the qml file needs to do this?
                      • Always confused. What are the non-occupied dependencies at runtime but is must when startup? I am targeting two folders: QtQuick\Controls and QtQuick\Extras
                      K Offline
                      K Offline
                      KillerSmath
                      wrote on 6 May 2019, 07:39 last edited by
                      #24

                      @Crawl.W
                      1- if my project's qml file locate two folder, how I should pass directory?

                      If your project is organized as below then pass the project path because the qmlimportscanner will find all files inside the root folder.

                      • Project
                        • qml_1
                          • file_1.qml
                        • qml_2
                          • file_2.qml

                      2 - just because the qml file needs to do this?
                      https://doc.qt.io/QtQuickCompiler/#overview

                      As .qml files are loaded at run-time, it is necessary to deploy them together with the released application.

                      3 - Always confused. What are the non-occupied dependencies at runtime but is must when startup? I am targeting two folders: QtQuick\Controls and QtQuick\Extras

                      Depend on which qml files are loaded.

                      @Computer Science Student - Brazil
                      Web Developer and Researcher
                      “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

                      C 1 Reply Last reply 6 May 2019, 10:01
                      1
                      • K KillerSmath
                        6 May 2019, 07:39

                        @Crawl.W
                        1- if my project's qml file locate two folder, how I should pass directory?

                        If your project is organized as below then pass the project path because the qmlimportscanner will find all files inside the root folder.

                        • Project
                          • qml_1
                            • file_1.qml
                          • qml_2
                            • file_2.qml

                        2 - just because the qml file needs to do this?
                        https://doc.qt.io/QtQuickCompiler/#overview

                        As .qml files are loaded at run-time, it is necessary to deploy them together with the released application.

                        3 - Always confused. What are the non-occupied dependencies at runtime but is must when startup? I am targeting two folders: QtQuick\Controls and QtQuick\Extras

                        Depend on which qml files are loaded.

                        C Offline
                        C Offline
                        Crawl.W
                        wrote on 6 May 2019, 10:01 last edited by Crawl.W 5 Jun 2019, 10:02
                        #25

                        I think this is the final answer to this question.Thanks to @KillerSmath 's for your patience. Thanks also to kenchan.
                        By the way, last question(with a sly grin),what windeployqt provides is not all necessary, how deploy by the best concise?

                        ODБOïO 1 Reply Last reply 6 May 2019, 10:36
                        0
                        • C Crawl.W
                          6 May 2019, 10:01

                          I think this is the final answer to this question.Thanks to @KillerSmath 's for your patience. Thanks also to kenchan.
                          By the way, last question(with a sly grin),what windeployqt provides is not all necessary, how deploy by the best concise?

                          ODБOïO Offline
                          ODБOïO Offline
                          ODБOï
                          wrote on 6 May 2019, 10:36 last edited by ODБOï 5 Jun 2019, 10:37
                          #26

                          hi
                          @Crawl.W said in Running a QML .exe file on Windows:

                          all necessary

                          1 start your app
                          2 select all the dlls
                          3 delete them
                          Only unused dlls will be deleted

                          C 1 Reply Last reply 7 May 2019, 01:15
                          0
                          • ODБOïO ODБOï
                            6 May 2019, 10:36

                            hi
                            @Crawl.W said in Running a QML .exe file on Windows:

                            all necessary

                            1 start your app
                            2 select all the dlls
                            3 delete them
                            Only unused dlls will be deleted

                            C Offline
                            C Offline
                            Crawl.W
                            wrote on 7 May 2019, 01:15 last edited by
                            #27

                            @LeLev Yeah,that's my solution, but it will delete qml file when load at JIT. I wanna know a one-step solution.

                            jsulmJ 1 Reply Last reply 7 May 2019, 04:22
                            0
                            • C Crawl.W
                              7 May 2019, 01:15

                              @LeLev Yeah,that's my solution, but it will delete qml file when load at JIT. I wanna know a one-step solution.

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 7 May 2019, 04:22 last edited by
                              #28

                              @Crawl.W "2 select all the dlls" - only select and delete DLLs, not anything else

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              C 1 Reply Last reply 8 May 2019, 05:47
                              0
                              • C Offline
                                C Offline
                                Crawl.W
                                wrote on 7 May 2019, 06:25 last edited by
                                #29

                                Note: I we use VirtualKeyboard will need copy QtQuick\VirtualKeyboard folder to program directory. When use windeployqt to deploy program, qmlimportscanner seems not to accomplish the job. (ENV: qt 5.12 + msvc2017)

                                1 Reply Last reply
                                0
                                • jsulmJ jsulm
                                  7 May 2019, 04:22

                                  @Crawl.W "2 select all the dlls" - only select and delete DLLs, not anything else

                                  C Offline
                                  C Offline
                                  Crawl.W
                                  wrote on 8 May 2019, 05:47 last edited by Crawl.W 5 Aug 2019, 05:49
                                  #30

                                  @jsulm This's an uncomfortable operation and that some dll is load at JIT, which need I try all possibilities when deploy.

                                  1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    Lezginohohol
                                    wrote on 28 Sept 2019, 10:57 last edited by Lezginohohol
                                    #31

                                    windeployqt not helping.
                                    Qt_5_12_1_MinGW_64

                                    called windeployqt --quick . in directory with only one exe file
                                    it created bunch of files (64 mb). "dir" output:

                                    28.09.2019  13:49    <DIR>          bearer
                                    11.03.2014  13:54         4 173 928 D3Dcompiler_47.dll
                                    28.09.2019  13:46            78 848 Empty.exe
                                    28.09.2019  13:49    <DIR>          iconengines
                                    28.09.2019  13:49    <DIR>          imageformats
                                    29.01.2019  07:27            24 576 libEGL.dll
                                    19.03.2018  18:14            74 240 libgcc_s_seh-1.dll
                                    29.01.2019  07:27         3 976 192 libGLESV2.dll
                                    19.03.2018  18:14         1 425 920 libstdc++-6.dll
                                    19.03.2018  18:14            52 224 libwinpthread-1.dll
                                    14.06.2016  15:00        20 923 392 opengl32sw.dll
                                    28.09.2019  13:49    <DIR>          platforms
                                    28.09.2019  13:49    <DIR>          qmltooling
                                    28.09.2019  13:49         6 354 944 Qt5Core.dll
                                    29.01.2019  07:30         6 498 304 Qt5Gui.dll
                                    29.01.2019  07:29         1 709 568 Qt5Network.dll
                                    29.01.2019  07:58         4 193 280 Qt5Qml.dll
                                    29.01.2019  08:02         4 087 808 Qt5Quick.dll
                                    29.01.2019  07:52           346 112 Qt5Svg.dll
                                    29.01.2019  07:34         5 649 920 Qt5Widgets.dll
                                    28.09.2019  13:49    <DIR>          styles
                                    28.09.2019  13:49    <DIR>          translations
                                    

                                    but no changes. application not running.
                                    thought the problem was in my code , tried same on maroon example got same result.

                                    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