Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Auto Version Numbering in QtCreator
QtWS25 Last Chance

Auto Version Numbering in QtCreator

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 3.1k Views
  • 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.
  • webzoidW Offline
    webzoidW Offline
    webzoid
    wrote on last edited by
    #1

    I've asked a variation of this question in the General forum but this one is more QtCreator specific. Current experience with QtCreator has shown me that it doesn't really handle application version numbering at all.

    At the moment, I have a crude "version.h" file which contains major, minor and build numbers which then get included into an "RC" file but this only works if I perform a project "re-build" rather than just a build.

    My other forum topic asked about how to get around this but it got me thinking, wouldn't it be useful if QtCreator added some support to allow auto-version numbering or at least give the developer some control over the version information written into an application?

    Visual Studio allows the entering of a * character as part of the version string which auto-generates a version build number - it wouldn't be a massive task to do the same in QtCreator.

    Any thoughts or tips anyone? Are there plugins which may already cope with this?

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

      Hi,

      Do you mean the VERSION variable from qmake ?

      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
      • webzoidW Offline
        webzoidW Offline
        webzoid
        wrote on last edited by
        #3

        @SGaist That's the Jasper! Is there any way of having one of the version numbers auto-incremented on every build?

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

          This stackoverflow answer might get you started.

          Note that what you are creating here is rather a build number. It might be complementary to the version number but it's not the same thing. I'd recommend keeping both separated.

          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
          • webzoidW webzoid

            @SGaist That's the Jasper! Is there any way of having one of the version numbers auto-incremented on every build?

            K Offline
            K Offline
            koahnig
            wrote on last edited by koahnig
            #5

            @webzoid

            There is a really old thread on this topic.

            After using Gerolf's/Gisbert approach (see in first post) I have changed to this git driven approach. However, the git approach requires a restart of qmake and certainly an update in git for each new built. Possibly you are looking more into a combination of both.

            If you are more in having an integrated updating in Qt creator, I believe there is already some request in JIRA on this Feel free to check out the feature request, update and upvote for it. That is the only where you get features included. The forum here is not actively monitored for such cases.

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

            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