Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Enumerate application profiles using QSettings
Anton Pleskanovskyy last edited by aha_1980
I wonder, how can I count up profiles for my application? Each profile include couple of its files: config file, log etc. All of application profiles placed in own dir with unique name (profile ID).
Is it possible to count them up using Qt classes and how to do so.
Thanks in advance for your help and time :-)
@Anton-Pleskanovskyy What are those "profiles"? How are they created? Who creates them?
If all these profiles are stored in same base directory then you just need to count the subdirectories.
c:\profiles\ profile1 profile2 profile3
In this example you would have 3 profiles. To make sure you only count valid profiles you can check the content of each profile subdirectory.
Anton Pleskanovskyy last edited by Anton Pleskanovskyy
@jsulm , actually I want to try extend Trojita IMAP Client functionality.
I'm going to try make a simple launcher (also powered by Qt as well as original software) to start the Trojita with certain profile passed to executable. So, for the sake of simplicity, yes each profile stored in separate subdirectory of config folder then how to count subfolders (to be crossplatform)? ("rough" simplification of my case)
Anton Pleskanovskyy last edited by