Qt World Summit: Register Today!

QtCreator sessions and build options

  • I'm using Qt Creator sessions to manage different projects. However it seems that build options are not saved in session information, instead they are a global setting.
    I have 2 projects that link two libraries, libA and libB, that must be compiled with different CONFIG options. What I see is that:

    • CONFIG options are not changed when switching between sessions
    • build directories for libraries are not changed when switching between sessions.

    Is that the intended behaviour? Is there a workaround that doesn't require to manually edit build options each time?

  • Moderators

    CONFIG options are saved in .pro.user file and that is single per project.

    So if you share single project between 2 sessions, the CONFIG will be shared, too. A workaround would be to keep 2 copies of the project (a PITA, I know).

    Please check Qt bugtracker, maybe this issue has been raised there already. If not, feel free to report it.

  • It seem that there is an open issue; https://bugreports.qt.io/browse/QTCREATORBUG-16487.
    Please upvote if you are affected.

  • Moderators


    One thought that this bug description suggests: perhaps there is an easier workaround. Add another (dummy) session with no open projects. Then when you want to switch your sessions do this:

    • session 1
    • dummy
    • session 2

    That should trigger project settings to be refreshed.

Log in to reply