function setFieldValue(field, hasValue, value) {
if (hasValue) {
// Need this othewise if we are on 4.5 and backspace instead of
// having 4. in the text field we end up with 4 which is confusing
if (field.text != value) {
field.text = value;
}
} else {
field.text = "";
}
}
onStartValueChanged: root.setFieldValue(field1, widgetData.hasStartValue, widgetData.startValue);
onHasStartValueChanged: root.setFieldValue(field1, widgetData.hasStartValue, widgetData.startValue);
onEndValueChanged: root.setFieldValue(field2, widgetData.hasEndValue, widgetData.endValue);
onHasEndValueChanged: root.setFieldValue(field2, widgetData.hasEndValue, widgetData.endValue);