I create a Setting class and set an instance of it as a context property in root context. In qml file I called value to read settings values.
All settings are working correctly except width and height. They're properly load but not applied. here is an example of it:
import QtQuick 2.0
Item{
id: diagram_main
property string url
height: settings.value(url + "/height")
width: settings.value(url + "/width")
visible: settings.value(url + "/visible")
Text {
id: diagram_label
property string url: diagram_main.url + "/label"
text: settings.value(url)
color: settings.value(url + "PenColor")
font.family: settings.value(url + "PenName")
font.pointSize: settings.value(url + "PenSize")
}
}
here visible and text and it's color and font settings are working correctly but not width or height.