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. How to run Qt application from windows commandline?
Forum Updated to NodeBB v4.3 + New Features

How to run Qt application from windows commandline?

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 11.7k 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.
  • A Offline
    A Offline
    aurora
    wrote on 26 Apr 2012, 04:30 last edited by
    #1

    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
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on 26 Apr 2012, 05:15 last edited by
      #2

      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
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on 26 Apr 2012, 05:32 last edited by
        #3

        I use QT SDK ....

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aurora
          wrote on 26 Apr 2012, 05:45 last edited by
          #4

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

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on 26 Apr 2012, 05:49 last edited by
            #5

            have you tried:

            qmake -project
            qmake file.pro

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aurora
              wrote on 26 Apr 2012, 06:01 last edited by
              #6

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

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on 26 Apr 2012, 06:06 last edited by
                #7

                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
                1
                • A Offline
                  A Offline
                  aurora
                  wrote on 26 Apr 2012, 06:11 last edited by
                  #8

                  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
                  0
                  • ? This user is from outside of this forum
                    ? This user is from outside of this forum
                    Guest
                    wrote on 26 Apr 2012, 06:16 last edited by
                    #9

                    ah..sorry I misunderstood.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      giesbert
                      wrote on 26 Apr 2012, 07:02 last edited by
                      #10

                      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
                      0
                      • V Offline
                        V Offline
                        vezprog
                        wrote on 26 Apr 2012, 19:17 last edited by
                        #11

                        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
                        0

                        1/11

                        26 Apr 2012, 04:30

                        • Login

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