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. [SOLVED] How to tell QtCreator where to store .pro.user settings? For development with different versions
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How to tell QtCreator where to store .pro.user settings? For development with different versions

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 5.0k 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
    artem.marchenko
    wrote on last edited by
    #1

    We develop our project on both Mac and Linux and have different versions of QtCreator installed. At the moment it is 2.4.0 on a Mac and 2.1.0 on Linux. Upgrading the Linux version is possible, but we'd prefer to keep it the way it is since QtCreator is taken with the rest of Qt from some proper package verified for our Linux distribution.

    Our code builds just fine from both command line and QtCreator on both system, but for runtime we need to set up a couple of different variables for Mac and Linux: DYLD_LIBRARY_PATH for Mac and LD_LIBRARY_PATH on Linux. That should coexist nicely in the project settings as these are different variables, but..

    Whenever older QtCreator opens the project, it deletes the custom settings.

    So I was thinking about making two nearly empty project files: myproject-mac.pro and myproject-linux.pro:
    @
    myproject-mac.pro
    include(myproject.pri)
    @
    hoping that QtCreator will store settings in myproject-mac.pro.user and myproject-linux.pro.user, but.. it still stores all settings in myproject.pro.user

    How to change it?
    Or what would be the proper way to get different runtime variables for different platforms?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      artem.marchenko
      wrote on last edited by
      #2

      Oups. Not sure what I was doing. Everything seems to work fine now. Qt creator uses .pro specific settings

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        Creator should just append ".user" to whatever project file you opened.

        Since you should not share .user files you should not be seeing the issue you are having;-)

        user files only ever work with exactly the one instance of Qt Creator that originally created it. You should never share them! Creator will even pop up a warning when opening a .user file that was created by another instance. So do not check the .user file into version control.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Indeed. Just don't put them in version control (just like you don't put any other generated files in version control), and you're good. You are using version control, arn't you?

          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