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?


  • Lifetime Qt Champion

    Hi,

    If you are using 5.2, have a look at the new XXXconverter functions from QMetaType.

    Hope it helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.