Re: [Interest] using QSetting when host application is using it as well

2017-02-06 Thread Frank Rueter | OHUfx
Ok, thanks Constantin. On 5/02/17 2:55 AM, Constantin Makshin wrote: QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.HomeLocation) and os.path.expanduser('~') will return path to the user's home directory ("C:\Users\") while the better/more_common/proper/recommended/whatever place

Re: [Interest] using QSetting when host application is using it as well

2017-02-04 Thread Constantin Makshin
QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.HomeLocation) and os.path.expanduser('~') will return path to the user's home directory ("C:\Users\") while the better/more_common/proper/recommended/whatever place for configuration files is somewhere under either "C:\Users\\AppData\Loc

Re: [Interest] using QSetting when host application is using it as well

2017-02-02 Thread Frank Rueter | OHUfx
Thanks. I'm stuck with QT 4.8.5 at the moment so QStandardPaths is not available, but I could use QDesktopServices instead, e.g.: QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.HomeLocation) What would be the difference to os.path.expanduser('~') though? Cheers, frank On 2/

Re: [Interest] using QSetting when host application is using it as well

2017-02-01 Thread Constantin Makshin
Hi Frank. Looks like the host application uses QSettings::setPath() (http://doc.qt.io/qt-5/qsettings.html#setPath) to enforce a specific directory for configuration files. Calling that method from your code is obviously a bad idea (high risk of screwing up the host application), so your "fallback"

Re: [Interest] using QSetting when host application is using it as well

2017-02-01 Thread Frank Rueter | OHUfx
In the meantime I am falling back on using this: os.path.expanduser('~/.config/companyName/appName') While this does not give me the OS' native support directory for the respective user at least it's consistent :) I'd still be interested in a QSettings solution though. Cheers, frank On

[Interest] using QSetting when host application is using it as well

2017-02-01 Thread Frank Rueter | OHUfx
Hi all, I have been using QSettings for reading/writing user settings. All works well until I run my (PySide) application inside a host application that is also written in QT, and which also uses the QSettings object. I am now struggling to understand how I can properly differentiate between