Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    How to run Qt application from windows commandline?

    General and Desktop
    3
    11
    10474
    Loading More Posts
    • 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.
    • A
      aurora last edited by

      I developed Qt application using "Qt Creator 2.3.0 Based on Qt 4.7.4 (32 bit)".
      I got its ".exe" file which run perfectly after double click on it.
      But I want users of this application to run it from their windows command line.
      How can i do that? what command they must type to run the application?

      1 Reply Last reply Reply Quote 0
      • ?
        Guest last edited by

        I QT SDK and this is how I get to a command line:

        go to:

        All Programs
        ->QT SDK
        ->Desktop
        -> Qt 4.8.1 for Desktop (MinGW

        Not sure if this is what you are looking for.

        1 Reply Last reply Reply Quote 0
        • ?
          Guest last edited by

          I use QT SDK ....

          1 Reply Last reply Reply Quote 0
          • A
            aurora last edited by

            No.....i want to know how to run a application(which is already developed using QT SDK) using command line....

            1 Reply Last reply Reply Quote 0
            • ?
              Guest last edited by

              have you tried:

              qmake -project
              qmake file.pro

              1 Reply Last reply Reply Quote 0
              • A
                aurora last edited by

                qmake is windows?? no id didnt try....
                i thought its only for windows....
                ok...whats the procedure?

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest last edited by

                  I am new to all this so I am guessing..

                  if you go to:
                  All Programs ->QT SDK ->Desktop -> Qt 4.8.1 for Desktop (MinGW)

                  This will give you a command line option. Once you have that open, CD to your project directory and do the following:

                  qmake -project
                  qmake file.pro

                  I am not sue if this is what you were looking for, sorry if I led you on a wild goose chase.

                  1 Reply Last reply Reply Quote 1
                  • A
                    aurora last edited by

                    oh...i think u misunderstood my words.....i want user of the Qt application(which i developed) should able to run through the commandline....they wont be having QT SDK.....

                    Hope it make sense to u...
                    Anyway thank u for your reply...:)

                    1 Reply Last reply Reply Quote 0
                    • ?
                      Guest last edited by

                      ah..sorry I misunderstood.

                      1 Reply Last reply Reply Quote 0
                      • G
                        giesbert last edited by

                        Hi aurora,

                        if you put all neededs stuff in the correct location (search for distribution on DevNet or the docs) it makes no difference if you run it from command line or from desktop.

                        Nokia Certified Qt Specialist.
                        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                        1 Reply Last reply Reply Quote 0
                        • V
                          vezprog last edited by

                          if you have all the required libraries in the directory, including the Qt dll's for your library, then you can just use the explicit path to run your application (unless you have a Qt license and built it statically, then you dont need the dll's)...

                          c:\path\to\your\application\file.exe

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post