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 use qmake for creating .pro files
Qt 6.11 is out! See what's new in the release blog

How to use qmake for creating .pro files

Scheduled Pinned Locked Moved Solved General and Desktop
qmake
13 Posts 2 Posters 14.1k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    No, I mean that you can avoid creating them by hand since Qt Creator offers the possibility to create them for you. You can very well add them to a project without copying them.

    That's normal, you should use the full path to your qmake version.

    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
    0
    • tomyT Offline
      tomyT Offline
      tomy
      wrote on last edited by tomy
      #5

      @SGaist said:

      That's normal, you should use the full path to your qmake version.

      Thanks for your replies. But please have a look at this and this screenshots.
      Where did I go wrong please?

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

        You are calling qmake without giving the full path to qmake as in C:\Qt\5.5\msvc_2013\bin\qmake.

        IIRC you might also have the option to open a pre-populated command line from Qt's entry in the start menu. That way you will have a console ready to be used.

        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
        0
        • tomyT Offline
          tomyT Offline
          tomy
          wrote on last edited by tomy
          #7

          My qmake.exe file is in the bin folder in the following path:
          C:\Qt\Qt5.5.1\5.5\mingw492_32\bin
          I retried using qmake here and apparently it succeeded but the project myqtapp doesn't still contain a .pro file and Run triangle is still grayed out.
          It's here.

          But please bear in mind that I've installed two Qt Creator IDEs:
          Qt creator IDE v. 5.5.1 (Qt Creator (Community))
          and also Qt Creator 3.6.0

          And I use Qt Creator 3.6.0 and the path above (to me) belongs to Qt creator IDE v. 5.5.1 not Qt Creator 3.6.0! That's why no changes in the project happen.

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

            I meant: from the folder where you files are, call qmake with the full path:

            cd C:\Users\CS\Documents\Qt\Forms\
            C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\qmake -project
            

            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
            • tomyT Offline
              tomyT Offline
              tomy
              wrote on last edited by tomy
              #9

              It worked!! Great :-)
              Thank you very much. You solved the issue I was involving in for days. Thanks so much. :-)

              And just for sureness:
              After qmake, I double clicked on the .pro file made. It took me to a page "configure project". I clicked on the "configure" button there. Then CTRL+R.

              An error: while building/deploying project from (kit: Desktop)
              I went to: Tools > Options > Build & Run > Kits > Compiler: (here I chose MinGW 4.9.2 32-bit ) > OK
              Then CTRL+R

              Another error:
              C:\Users\CS\Documents\Qt\Forms\main.cpp:1: error: QApplication: No such file or directory
              #include <QApplication>
              ^

              Probably it's of the codes and has nothing to do with the work qmake done.
              If I cannot solve this issue, I try to post this in another thread.

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

                You need to edit the .pro file and add QT += widgets. The project functionality generates a "skeleton" that you have to adjust a bit depending on what you used in your code.

                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
                2
                • tomyT Offline
                  tomyT Offline
                  tomy
                  wrote on last edited by
                  #11

                  Thank you very much. I really appreciate you.

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

                    You're welcome !

                    Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

                    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
                    0
                    • tomyT Offline
                      tomyT Offline
                      tomy
                      wrote on last edited by
                      #13

                      @SGaist said:

                      You're welcome !

                      Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

                      Sure. Thanks again. :-)

                      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