import com.jolla.settings 1.0
Rectangle {
id: rect
anchors.fill: parent
color: '#000000'
Settings { //hash this out and the code works but won't save last color created.
id: settings
property alias color: rect.color
}
MouseArea {
anchors.fill: parent
onClicked: rect.color = Qt.hsla(Math.random(), 0.5, 0.5, 1.0);
}
}
}
| The Following 5 Users Say Thank You to Markkyboy For This Useful Post: | ||
| The Following 7 Users Say Thank You to velox For This Useful Post: | ||
| The Following 7 Users Say Thank You to Ancelad For This Useful Post: | ||
| The Following User Says Thank You to coderus For This Useful Post: | ||
| The Following 4 Users Say Thank You to Markkyboy For This Useful Post: | ||
| The Following 3 Users Say Thank You to Markkyboy For This Useful Post: | ||

| The Following 3 Users Say Thank You to Dave999 For This Useful Post: | ||

)import Nemo.Configuration 1.0
Item {
Rectangle {
id: rect
anchors.fill: parent
color: '#000000'
MouseArea {
anchors.fill: parent
onClicked: rect.color = Qt.hsla(Math.random(), 0.5, 0.5, 1.0);
}
}
ConfigurationGroup {
id: settings
path: "/apps/harbour-yourApp"
}
Component.onCompleted: {
rect.color = settings.value("rectColor", "#000000")
}
Component.onDestruction: {
settings.setValue("rectColor", rect.color)
}
}

| The Following 4 Users Say Thank You to john_god For This Useful Post: | ||
)import Nemo.Configuration 1.0
Item {
Rectangle {
id: rect
anchors.fill: parent
color: '#000000'
MouseArea {
anchors.fill: parent
onClicked: rect.color = Qt.hsla(Math.random(), 0.5, 0.5, 1.0);
}
}
ConfigurationGroup {
id: settings
path: "/apps/harbour-yourApp"
}
Component.onCompleted: {
rect.color = settings.value("rectColor", "#000000")
}
Component.onDestruction: {
settings.setValue("rectColor", rect.color)
}
}


import QtQuick 2.0
import Sailfish.Silica 1.0
import org.nemomobile.configuration 1.0
Page {
Rectangle {
id: rect
anchors.fill: parent
color: '#000000'
MouseArea {
anchors.fill: parent
onClicked: rect.color = Qt.hsla(Math.random(), 0.5, 0.5, 1.0);
}
}
ConfigurationGroup {
id: settings
path: "/apps/harbour-yourApp"
}
Component.onCompleted: {
rect.color = settings.value("rectColor", "#000000")
}
Component.onDestruction: {
settings.setValue("rectColor", rect.color)
}
| The Following 5 Users Say Thank You to Markkyboy For This Useful Post: | ||