diff options
Diffstat (limited to 'util/qt3d/modeltweak/qml/Widgets/InputBox.qml')
-rw-r--r-- | util/qt3d/modeltweak/qml/Widgets/InputBox.qml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/util/qt3d/modeltweak/qml/Widgets/InputBox.qml b/util/qt3d/modeltweak/qml/Widgets/InputBox.qml new file mode 100644 index 00000000..d3d31837 --- /dev/null +++ b/util/qt3d/modeltweak/qml/Widgets/InputBox.qml @@ -0,0 +1,39 @@ +import QtQuick 1.0 + +Item { + id: textInput + width: 60 + height: 20 + property alias label: lbl.text + property alias input: inputBox + +// Binding { +// target: textInput; property: "value" +// value: inputBox.text +// } +// Binding { +// target: inputBox; property: "text" +// value: { var result = textInput.value*100; return Math.round(result)/100 } +// } + + Text { + id: lbl + color: "lightgray" + anchors.left: parent.left + } + + Rectangle { + border.color: "gray" + color: "transparent" + width: 40 + height: inputBox.height + anchors.right: parent.right + TextInput { + id: inputBox + anchors { fill: parent; leftMargin: 5 } + color: "white" + text: { var result = textInput.value*100; return Math.round(result)/100 } + selectByMouse: true; readOnly: true + } + } +} |