@Grek TextField{ id:textBox text: slideBox.x validator: IntValidator{ top: 255 bottom: 0 } maximumLength: 3 // onEditingFinished or onTextChanged or onAccepted( choose which fits better ) onEditingFinished: slidebox.x = parseInt(text) } Rectangle{ id:slideBox width: 10 height: 15 anchors.fill: parent border.width: 1 //x : textBox.text MouseArea { anchors.fill: parent drag.target: parent drag.threshold: 0 drag.maximumX: 400 drag.minimumX: 30 } }