QVariant structures to text and back
-
Hi all,
I would like to write QVariantMaps to a human-readable format and read them back later.
I tried using JSon format, but unfortunately the type information gets lost then - QColor variants are written as "#00FF00" style strings, and there is no way to have QJson parse it as a QColor variant. Is there some other way to serialize QVariants to text? -
Hi,
If you are using 5.2, have a look at the new XXXconverter functions from QMetaType.
Hope it helps