This code will not even compile. In save_setting() function setting is defined as variable and later is used as if it is a pointer?
This code will not even compile. In save_setting() function setting is defined as variable and later is used as if it is a pointer?
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
A_Stone (26th May 2013)
You are right. Before my tried to change it's been likeBut all the same Qsettings doesn't write new settings in ini-fileQt Code:
setting.setValue("MySQL/host", host);To copy to clipboard, switch view to plain text mode
You are using a relative file path to the INI file. Make sure the working directory of the process is what you think it is.
A_Stone (26th May 2013)
In Qt 4.8 it works.In Qt5.0 I tried to writeIt did't help.Qt Code:
QString path = QApplication::applicationDirPath() + "/settings.ini"; QSettings setting(path, QSettings::IniFormat);To copy to clipboard, switch view to plain text mode
I solved the promblem. The programm was on a flash card. When I copied it on my computer, QSettings again started to work.
Bookmarks