Save QString in QSettings without quotes

179 views Asked by At

I save some values in my .ini-file which works fine.

Now I want to save a QString in the file, which I put together inside my application.

QString s = "xwr289vjkloji9";

QSettings settings("file.ini", QSettings::Format::IniFormat);
settings.setValue("dbp", s);

Inside my file.ini it saves dbp="xwr289vjkloji9"

Basically this is right, but I need the String without quotation marks. Is there any way to remove them or should I save the String differently?

I cannot cut the first and last letter, because the quotes do not exists inside the String, they're just the String-identifier.

My only option now is to cut the quotation marks when receiving the value back from the file but I want to try it without, maybe there is a way.

0

There are 0 answers