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
Forum Updated to NodeBB v4.3 + New Features

Running a QML .exe file on Windows

Scheduled Pinned Locked Moved Solved General and Desktop
31 Posts 9 Posters 8.4k Views 2 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by
    #1

    Hi,

    Using Qt 5.10 on Qt Creator I ran a QML program by the Desktop kit in the Release mode. Then I copied its executable file into a folder and added all .dll files it requested for being run from this address:
    C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin

    Now when I double click the file it makes no action!
    What can the problem be please?

    0_1514835434582_Capture.PNG

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

      Hi,

      Take a look at windeployqt especially the qmldir option for deploying applications for Windows.

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

      tomyT 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        Take a look at windeployqt especially the qmldir option for deploying applications for Windows.

        tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by
        #3

        @SGaist

        Take a look at windeployqt especially the qmldir option

        It's a executable file in the address:

        C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin

        When I double click it, it has no reaction just a quick blink.
        If there is an appropriate method to make that "my_file" file run properly, please tell me of that.

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

          It's a command line tool.

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

          tomyT 1 Reply Last reply
          2
          • SGaistS SGaist

            It's a command line tool.

            tomyT Offline
            tomyT Offline
            tomy
            wrote on last edited by
            #5

            @SGaist

            Here are the files with that name on my PC:

            0_1515068360412_Capture.PNG

            Which one do you mean? And how to use its options especially qmldir please?

            1 Reply Last reply
            0
            • VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by VRonin
              #6
              • click start
              • type cmd press enter.
              • A black console opens
              • type "C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin\windeployqt.exe"
              • read the help on what to pass as arguments
              • call windeployqt again with the appropriate arguments

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              1 Reply Last reply
              2
              • tomyT Offline
                tomyT Offline
                tomy
                wrote on last edited by
                #7

                Hi,

                I used this command. Is it correct please?

                C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin\windeployqt.exe --qmldir C:\Users\Abbasi\Desktop\Test\QML_test.apk C:\Users\Abbasi\Desktop\data\QML_test.exe

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

                  You have to give the path to where your QML files are in your application sources to the --qmldir option.

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

                  tomyT 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    You have to give the path to where your QML files are in your application sources to the --qmldir option.

                    tomyT Offline
                    tomyT Offline
                    tomy
                    wrote on last edited by
                    #9

                    @SGaist

                    You have to give the path to where your QML files are in your application sources

                    Which folder do you mean from the following ones? I used the second one from top.

                    0_1515241294206_Capture.PNG

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

                      As I already wrote: your application sources where the qml files are located.

                      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
                      1
                      • Crawl.WC Offline
                        Crawl.WC Offline
                        Crawl.W
                        wrote on last edited by
                        #11

                        Have you solved this problem?I encountered the same problem,my enviroment is msvc2017_64 + win10.

                        jsulmJ 1 Reply Last reply
                        0
                        • Crawl.WC Crawl.W

                          Have you solved this problem?I encountered the same problem,my enviroment is msvc2017_64 + win10.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @Crawl.W Did you use windeployqt tool?

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

                          Crawl.WC 1 Reply Last reply
                          1
                          • jsulmJ jsulm

                            @Crawl.W Did you use windeployqt tool?

                            Crawl.WC Offline
                            Crawl.WC Offline
                            Crawl.W
                            wrote on last edited by Crawl.W
                            #13

                            @jsulm Yes,windeployqt can not deploy a executable application,I double click the exe but nothing ever happens.I answer the question on stackoverflow.com where user name is Crawl.W as here.I copy qml floder to runtime directory,and then run the exe, then fell all other unoccupied files heartily.But seemly cannot delete some unoccupied thing in qml\QtQuick, if I delete it double click the exe will have nothing happened.

                            K 1 Reply Last reply
                            0
                            • Crawl.WC Crawl.W

                              @jsulm Yes,windeployqt can not deploy a executable application,I double click the exe but nothing ever happens.I answer the question on stackoverflow.com where user name is Crawl.W as here.I copy qml floder to runtime directory,and then run the exe, then fell all other unoccupied files heartily.But seemly cannot delete some unoccupied thing in qml\QtQuick, if I delete it double click the exe will have nothing happened.

                              K Offline
                              K Offline
                              kenchan
                              wrote on last edited by
                              #14

                              @Crawl.W
                              You must pass it the correct arguments not just double click the exe.
                              did you look at he docs here

                              1 Reply Last reply
                              1
                              • Crawl.WC Offline
                                Crawl.WC Offline
                                Crawl.W
                                wrote on 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.

                                KillerSmathK 1 Reply Last reply
                                0
                                • Crawl.WC Crawl.W

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

                                  KillerSmathK Offline
                                  KillerSmathK Offline
                                  KillerSmath
                                  wrote on 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

                                  Crawl.WC 1 Reply Last reply
                                  2
                                  • KillerSmathK KillerSmath

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

                                    Crawl.WC Offline
                                    Crawl.WC Offline
                                    Crawl.W
                                    wrote on last edited by Crawl.W
                                    #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.

                                    KillerSmathK 1 Reply Last reply
                                    0
                                    • Crawl.WC Crawl.W

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

                                      KillerSmathK Offline
                                      KillerSmathK Offline
                                      KillerSmath
                                      wrote on last edited by KillerSmath
                                      #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

                                      Crawl.WC 1 Reply Last reply
                                      0
                                      • KillerSmathK KillerSmath

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

                                        Crawl.WC Offline
                                        Crawl.WC Offline
                                        Crawl.W
                                        wrote on last edited by
                                        #19

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

                                        KillerSmathK 1 Reply Last reply
                                        0
                                        • Crawl.WC Crawl.W

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

                                          KillerSmathK Offline
                                          KillerSmathK Offline
                                          KillerSmath
                                          wrote on 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

                                          Crawl.WC 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