Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QSettings with Symbian Anna: QVariant::save: unable to save type 136.



  • I'm keeping getting this message every time I save settings on Symbian Anna device. The value is successfully saved, no worries about that. Still I wonder why I'm getting this message?



  • Post some code so that someone can help you!



  • All type above 127 are user type, and so is 136. You need to provide [[Doc:QDataStream]] operator overloads for your custom class.



  • I'm getting this message when setting QString values to QSettings.



  • Ah, the 136 is not a QVariant type enum, but a QMetaType type.

    136 is QMetaType::QObjectStar, which denotes a pointer to a QObject. Those cannot be serialized in a sane way. The address the pointer holds, most probably isn't valid on time the settings are read again. And serializing the object itself doesn't make sense too.

    And no, the value is not saved!


Log in to reply