A nice thing about dconf is that your app is notified when settings are
changed by another process, e.g. the settings app.
Settings applets are not allowed in harbour though :)
Cheers,
-Slava
Ok, got it working, thank you.
But since I want this to be as portable as possible (I manage to make
one repo for sailfish and android), I would rather use Settings
from Qt.labs.settings 1.0, wich doenst seem to be available in sailfish.
I'm thinking on creating a class based on QSettings and export it to
qml. Or do you guys have any other aproach/sugestion ?
Thanks
João
Em segunda-feira, 21 de maio de 2018 08:07:46 GMT+1, Pekka Vuorela
<pekka.vuor...@jolla.com> escreveu:
On Mon, 2018-05-21 at 04:45 +0000, joao morgado via Devel wrote:
> 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 ?
>
>
> ConfigurationValue {
> id: mysettings
> property alias saveColor: mycolor.color
> property alias mystring: page.hello
> //property color saveColor: "red"
> }
>
You should have a key there to indicate what configuration value should
be accessed. And value is referenced with 'value' property.
ConfigurationValue {
id: mysettings
key: "/path/in/the/dconf/hierarchy/some_option"
}
Component.onCompleted: console.log("Value: ", mysettings.value)
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org