Each of those TumblerColumn (whatever that element is) has a "weight" associated, right?
So its "value" is that weight multiplied with the value it shows.
The "code" you have is then simply the sum of these values.
Since you did not show the TumblerColumn element, we'll have to make due with part of the ugly code and use currentIndex.
TumblerColumn
{
id: ueNumericTumblerColumnDigit1000
readonly property int value: currentIndex * 1000
model: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
} // ueNumericTumblerColumnDigit1000
TumblerColumn
{
id: ueNumericTumblerColumnDigit1000
readonly property int value: currentIndex * 1000
model: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
} // ueNumericTumblerColumnDigit1000
To copy to clipboard, switch view to plain text mode
Tumbler {
id: ueLoginKeypadTumbler
readonly property int code: ueNumericTumblerColumnDigit1000.value + ....
}
Button {
onClicked: print(ueLoginKeypadTumbler.code)
}
Tumbler {
id: ueLoginKeypadTumbler
readonly property int code: ueNumericTumblerColumnDigit1000.value + ....
}
Button {
onClicked: print(ueLoginKeypadTumbler.code)
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks