<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>A nice thing about dconf is that your app is notified when
settings are changed by another process, e.g. the settings app.</p>
<p>Settings applets are not allowed in harbour though :)<br>
</p>
Cheers,<br>
-Slava<br>
<div class="moz-cite-prefix"><br>
</div>
<blockquote type="cite"
cite="mid:450112744.3557895.1526897616979@mail.yahoo.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div style="font-family:Helvetica Neue, Helvetica, Arial,
sans-serif;font-size:16px;">
<div>Ok, got it working, thank you.</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>I'm thinking on creating a class based on QSettings and
export it to qml. Or do you guys have any other
aproach/sugestion ?</div>
<div><br>
</div>
<div>Thanks</div>
<div>João</div>
<div id="yahoo_quoted_7148000359" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial,
sans-serif;font-size:13px;color:#26282a;">
<div> Em segunda-feira, 21 de maio de 2018 08:07:46 GMT+1,
Pekka Vuorela <a class="moz-txt-link-rfc2396E" href="mailto:pekka.vuorela@jolla.com"><pekka.vuorela@jolla.com></a> escreveu: </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div dir="ltr">On Mon, 2018-05-21 at 04:45 +0000, joao
morgado via Devel wrote:<br clear="none">
> Hi Martin<br clear="none">
> <br clear="none">
> Thanks for your replay. <br clear="none">
> I did a very small example, trying to save a
rectangle color, but if<br clear="none">
> fails. When starting, it's always red. Am I missing
something ?<br clear="none">
> <br clear="none">
> <br clear="none">
> ConfigurationValue {<br clear="none">
> id: mysettings<br clear="none">
> property alias saveColor: mycolor.color<br
clear="none">
> property alias mystring: page.hello<br
clear="none">
> //property color saveColor: "red"<br
clear="none">
> }<br clear="none">
> <br clear="none">
<br clear="none">
You should have a key there to indicate what
configuration value should<br clear="none">
be accessed. And value is referenced with 'value'
property.
<div class="yqt0732983633" id="yqtfd61059"><br
clear="none">
<br clear="none">
ConfigurationValue {<br clear="none">
id: mysettings</div>
<br clear="none">
key: "/path/in/the/dconf/hierarchy/some_option" <br
clear="none">
}<br clear="none">
<br clear="none">
Component.onCompleted: console.log("Value: ",
mysettings.value)
<div class="yqt0732983633" id="yqtfd14786"><br
clear="none">
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a class="moz-txt-link-abbreviated" href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a></pre>
</blockquote>
<br>
</body>
</html>