[Qt-interest] How do I remove " " from a QSettings

Andreas Pakulat apaku at gmx.de
Fri Jun 18 20:42:53 CEST 2010


On 18.06.10 10:07:30, David Boosalis wrote:
> I am converting an old TKL code to QT.  The new Qt code needs to write ini
> files that are backward compatible to the old software.  One major
> difference is that QSettings.value(str) write out double quotes.  I'd like
> to get rid of the double quotes.
> 
> For example one line of output is:
>            SpiceModel = "$*38,38"
> 
> I'd like to have QSettings not write with double quotes around the value

Looking at Qt's source code (iniEscapedString) the problem is the comma in
your example above. [,;= ] and empty strings cause that function to write
out quotes. If you can't avoid the comma and other characters, then you'll
have to write (or copy Qt's) own ini-parser.

Andreas

-- 
You recoil from the crude; you tend naturally toward the exquisite.



More information about the Qt-interest-old mailing list