X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmdictionary%2Fqml%2FMySpinBox.qml;h=9f0d47ced03295db6ef7a9f1b77ab0cbbda68d5b;hb=1da27e0416f9569943ff9596005ed074cbdc573d;hp=c248bbeac16fe5e994a287f53a658b2874aa52c8;hpb=f106801717e7c5485338655cd6ffe5f314fac27c;p=mdictionary diff --git a/src/mdictionary/qml/MySpinBox.qml b/src/mdictionary/qml/MySpinBox.qml index c248bbe..9f0d47c 100644 --- a/src/mdictionary/qml/MySpinBox.qml +++ b/src/mdictionary/qml/MySpinBox.qml @@ -31,14 +31,16 @@ Rectangle { height: rectangle1.height*0.6; text: "123" anchors.centerIn: parent - validator: IntValidator{bottom: 0; top: 500;} + validator: IntValidator{bottom: minValue; top: maxValue;} transformOrigin: Item.Left selectByMouse: true; font.pixelSize: rectangle1.height * .5; onCursorPositionChanged: moveCursorSelection(cursorPosition); - //focus: rectangle1.focus; onTextChanged: rectangle1.valueChange(stringToInt(text_input1.text)); - + onFocusChanged: { + if(focus==false) + text=stringToInt(text); + } } Timer {