[SailfishDevel] ConfigurationValue default path

Pekka Vuorela pekka.vuorela at jolla.com
Mon May 21 07:07:42 UTC 2018


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)



More information about the Devel mailing list