Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
5.6.2
-
None
-
iOS 10.2.1, iPad Air, Qt 5.6.2
Description
I have a field in Settings (QML Type) as variant, and its a simple key value object. Everything works fine when initializing, using, and persisting this variant at runtime but after closing and reopening the application, i can't get my persisted data from Settings, it simply returns "@Variant(" as string. This scenario works properly in "iOS 9.3" and "macOS Sierra 10.12.3" but fails in "iOS 10.2.1"
Note : tested application with compiling both iOS SDK 9 & iOS SDK 10, results are the same.
Here is a simple qml code for quick test :
sample.qml
Component.onCompleted: { console.log(settings.keyValueObj) //output: undefined or @Variant( if(!settings.keyValueObj) settings.keyValueObj = {}; } Settings { id: settings property int counter: 0 property variant keyValueObj } Button { width: 200; height: 50; text:"Click !" onClicked: { settings.counter++; settings.keyValueObj["i"+settings.counter] = settings.counter; } }