[SailfishDevel] Recommended replacement for a spinner?
Osmo Salomaa
otsaloma at iki.fi
Tue Nov 1 20:59:54 UTC 2016
On 01.11.2016 21:15, Marcin Mielniczuk wrote:
> In my app I'd like to present the user a spinner to let them choose an
> arbitrary integer.
>
> What is a recommended replacement for this in Sailfish Silica? A
> TextField with IntValidator? Or is there anything better?
Add inputMethodHints and it should be good.
TextField {
inputMethodHints: Qt.ImhDigitsOnly
}
Silica does offer a slider, but it's probably bad if the integer is
indeed arbitrary, as you'd need to set a minimum and maximum, and a
linear scale between them might not be appropriate.
--
Osmo Salomaa <otsaloma at iki.fi>
More information about the Devel
mailing list