[SailfishDevel] ConfigurationValue default path
joao morgado
joaodeusmorgado at yahoo.com
Mon May 21 04:45:20 UTC 2018
Hi Martin
Thanks for your replay. I did a very small example, trying to save a rectangle color, but if fails. When starting, it's always red. Am I missing something ?
Rectangle { id: mycolor color: "red" //color: mysettings.saveColor anchors.fill: parent
MouseArea { anchors.fill: parent onClicked: { mycolor.color = Qt.colorEqual(mycolor.color, "red") ? "blue" : "red" hello === "I'm red" ? hello = "I'm blue" : hello = "I'm red" }
} Text { text: hello } }
property string hello: "I'm red" ConfigurationValue { id: mysettings property alias saveColor: mycolor.color property alias mystring: page.hello //property color saveColor: "red" }
/*Component.onCompleted: console.log("initial color: "+mysettings.saveColor) Component.onDestruction: { mysettings.saveColor = mycolor.color console.log("destruction color: "+mysettings.saveColor) }*/
CheersJoão
Em sexta-feira, 18 de maio de 2018 06:04:27 GMT+1, Martin Kampas <martin.kampas at jolla.com> escreveu:
#yiv4199055280 P {margin-top:0;margin-bottom:0;}Hi João,
The storage backend is dconf https://wiki.gnome.org/Projects/dconf
BR,
Martin
From: Devel [devel-bounces at lists.sailfishos.org] on behalf of joao morgado via Devel [devel at lists.sailfishos.org]
Sent: Friday, May 18, 2018 6:54 AM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] ConfigurationValue default path
Hi
Where does ConfigurationValue saves the data ? I didnt find nothing in "/home/nemo/.config" related to my app.In desktop and android I sucessfully used the equivalent qml Settings to save my stuff, but in sailfish nothing is being saved using ConfigurationValue.
CheersJoão
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20180521/b92761bb/attachment.html>
More information about the Devel
mailing list