2

If you create a SpinBox with a minimumValue of 100, it is difficult to manually enter numbers because validation happens as you type so any temporary value in the edit field that is outside the range bounds is prohibited.

Take a SpinBox supporting the range of 100-500:

import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2

ApplicationWindow {
    width: 300;  height: 200

    SpinBox {
        anchors.centerIn: parent
        minimumValue: 100; maximumValue: 500
    }
}

If you click into the input box, the entire value is selected and typing any number key would replace the current value with a single digit, which is less than 100 and therefore prevented. This renders pretty much any minimumValue above 1 useless.

But I really like all the other behavior I get from the SpinBox. Any suggestions?

pixelgrease
  • 1,940
  • 23
  • 26
  • 3
    The suggestion is that [it's a bug](https://bugreports.qt.io/browse/QTBUG-42342) and that it should be fixed in the upcoming 5.4.1 release. :) Feel free to try the available snapshots [here](https://download.qt.io/snapshots/qt/5.4/5.4.1/). – BaCaRoZzo Feb 18 '15 at 08:58
  • @BaCaRoZzo - thanks for the defect link! You are correct; I can no longer reproduce this issue now that I've updated Qt. – pixelgrease Nov 05 '15 at 18:50

1 Answers1

0

BaCaRoZzo answered this: it's a QML defect that has been addressed as of Qt 5.4.1 and can no longer be reproduced.

Community
  • 1
  • 1
pixelgrease
  • 1,940
  • 23
  • 26