import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Spinbox Test")
ColumnLayout{
Button {
id:but1
text: "Button 1"
}
SpinBox {
focus: true
from: 10
to: 1000
value: 100
editable : false
KeyNavigation.backtab: but1
KeyNavigation.tab: but2
KeyNavigation.left: but1
KeyNavigation.right: but2
textFromValue : function(value, locale) {
console.log("textFromValue called")
return Number(value).toLocaleString(locale, 'f', 0);
}
valueFromText : function(text, locale) {
console.log("valueFromText called")
return Number.fromLocaleString(locale, text);
}
}
Button {
id:but2
text: "Button 2"
}
}
}