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 isolate .config/QtProject.conf between applications
QtWS25 Last Chance

How to isolate .config/QtProject.conf between applications

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

    I have two Qt-based applications running on my Linux machine; FreeCAD and VLC (video player).

    I have discovered that modifying the 'open file' dialogue in FreeCAD also modifies the 'open file' dialogue in VLC. This post on the FreeCAD forum explains the problem more fully...

    https://forum.freecadweb.org/viewtopic.php?f=3&t=70930

    I have discovered that Qt saves the dialogue config in .config/QtProject.conf, regardless of which application is running. It seems to me to be a somewhat (frankly) stupid idea to share such configuration but if that's what Qt wants to do then ...well.

    My question is, is there an environment variable I can set before running each of these applications so that I can point the Qt library to different .config/QtProject.conf files so that they don't interfere with each other? I have searched but all the env variable references I can find seem to relate to build-time tools and not run-time applications. I know there are SOME env variables because I already set QT_SCALE_FACTOR to adjust the scale of the Qt UI component, and that works.

    If there is no such environment variable then can anyone suggest another fix?

    regards and thanks in advance,

    Rich

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      QFileDialog does that so that you can have a common set of favourite locations among other things. I can see why that may be annoying though.

      It is stored in the UserScope by QSettings. The default UserScope paths on Unix, macOS, and iOS ($HOME/.config or $HOME/Settings) can be overridden by the user by setting the XDG_CONFIG_HOME environment variable.

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rich83
        wrote on last edited by
        #3

        @ChrisW67 said in How to isolate .config/QtProject.conf between applications:

        XDG_CONFIG_HOME

        I shower endless thanks on you! You have saved me from certain madness. Thank you so much.

        (for the avoidance of doubt - yes, it works wonderfully)

        Rich.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved