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. .pro file created by creator and created by qmake command
Forum Updated to NodeBB v4.3 + New Features

.pro file created by creator and created by qmake command

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.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.
  • U Offline
    U Offline
    user001
    wrote on last edited by
    #1

    When I create a project from Qt Creator, a .pro file is created:

    @QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    ...
    @

    after that, I run qmake -project, above content is replaced with :
    @INCLUDEPATH += .
    ...
    @

    So, the .pro file created by the Creator should be used and we should NOT do qmake -project for an existing project. Am I right?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Obviously your qt creator is aware of Qt 5. So maybe version 2.6 or 2.7.
      What is your version of qmake? Is it one of Qt 4?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • U Offline
        U Offline
        user001
        wrote on last edited by
        #3

        [quote author="koahnig" date="1373555135"]Obviously your qt creator is aware of Qt 5. So maybe version 2.6 or 2.7.
        What is your version of qmake? Is it one of Qt 4? [/quote]

        It comes with the Qt Creater 5.0.2.

        QMake version 3.0
        Using Qt version 5.0.2 in C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\lib

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dbzhang800
          wrote on last edited by
          #4

          Hi, why do you want to re-generate the project file if you already have a working one?

          Qt Creator 's wizards can create the basic project file suitable for Qt4 and Qt5.

          While qmake -project is normally used to generate a basic project file if you already has source code files.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            [quote author="1+1=2" date="1373558267"]Hi, why do you want to re-generate the project file if you already have a working one?

            Qt Creator 's wizards can create the basic project file suitable for Qt4 and Qt5.

            While qmake -project is normally used to generate a basic project file if you already has source code files.
            [/quote]

            For one thing you are right, why redoing something already available and functioning. However, one would expect that either way is generating something functioning.

            @user001: So the question would be, is the qmake generated version also working?
            If no, you might want to check on "JIRA":https://bugreports.qt-project.org/secure/Dashboard.jspa for a bug report or file one, if none is already there.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dbzhang800
              wrote on last edited by
              #6

              What Qt Creator does:

              • When you create a Qt project, you need to select a suitable wizard or template.
              • The wizard will generate source codes file according to your selected template.
              • Then it will generate a .pro file will manage your source codes files.
              • You can build and run this application without writing any code now.

              What qmake does:

              • You already has source code files. For example, you has just create a file called main.cpp, or you have a project which managed by another tools such as CMake.
              • run qmake -project to generate a .pro file based on the files in CWD.
              • The created .pro file probably will need to be edited. For example add the QT variable to specify what modules are required.
              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