Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0
-
None
-
QtQuick 2 - Qt 5.2.0 - Ubuntu 13.04 x86_64
Description
When setting the "bottom" property of an IntValidator inside a TextInput to something greater than zero, the TextInput shows a wrong behavior. The following code demonstrates the issue (Qt-5.2.0 with Android support under Ubuntu 13.04 x86_64).
IntValidatorBug.qml
import QtQuick 2.1 Rectangle { id: mainwindow objectName: "mainwindow" width: 1024 height: 768 TextInput { id: testtextinput objectName: "testtextinput" text: "170" font.pixelSize: 36 x: 100 y: 200 width: 200 height: 200 property size range: Qt.size(160, 180) validator: IntValidator { id: rangevalidator objectName: testtextinput.objectName + "_rangevalidator" bottom: testtextinput.range.width top: testtextinput.range.height Component.onCompleted: { console.log("Component.onCompleted objectName: " + objectName + " bottom: " + bottom + " top: " + top) } } onAccepted: { text = "accepted" } } Text { id: testisacceptable font.pixelSize: 36 text: testtextinput.acceptableInput anchors.top: testtextinput.bottom anchors.left: testtextinput.left anchors.right: testtextinput.right height: 200 } }
Trying to type the number 159, the TextInput allows to write the whole number, the acceptableInput property is set to false, but pressing enter, the onAccepted() slot is executed without problems.