How to isolate .config/QtProject.conf between applications
-
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
-
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.
-
@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.