Quote Originally Posted by anda_skoa View Post
Aside from the id problem, are you sure JavaScript defines this * operator for arrays that you are using?

From the look of it this could be a numerical lock, where if of these TumblerColumns is one digit.
If so, why calculate the resulting value outside of the component?

Cheers,
_
I've managed to complete task on my own. Here is Tumbler:
Qt Code:
  1. Tumbler
  2. {
  3. id: ueLoginKeypadTumbler
  4.  
  5. Layout.fillWidth: true
  6. Layout.fillHeight: false
  7.  
  8. height: 100
  9.  
  10. antialiasing: true
  11.  
  12. TumblerColumn
  13. {
  14. id: ueNumericTumblerColumnDigit1000
  15.  
  16. model: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  17. } // ueNumericTumblerColumnDigit1000
  18.  
  19. TumblerColumn
  20. {
  21. id: ueNumericTumblerColumnDigit100
  22.  
  23. model: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  24. } // ueNumericTumblerColumnDigit100
  25.  
  26. TumblerColumn
  27. {
  28. id: ueNumericTumblerColumnDigit10
  29.  
  30. model: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  31. } // ueNumericTumblerColumnDigit10
  32.  
  33. TumblerColumn
  34. {
  35. id: ueNumericTumblerColumnDigit1
  36.  
  37. model: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  38. } // ueNumericTumblerColumnDigit1
  39. } // ueLoginKeypadTumbler
To copy to clipboard, switch view to plain text mode 
and here is Button code:
Qt Code:
  1. Button
  2. {
  3. id: ueButtonLogin
  4.  
  5. Layout.fillWidth: true
  6.  
  7. text: qsTr("Login")
  8.  
  9. onClicked:
  10. {
  11. var uePinCode=0;
  12.  
  13. for(var index=0; index<ueLoginKeypadTumbler.columnCount; index++)
  14. {
  15. uePinCode+=ueLoginKeypadTumbler.getColumn(index).currentIndex*Math.pow(10,
  16. (ueLoginKeypadTumbler.columnCount-index-1));
  17. // print("Index: "+index+" | value: " +ueLoginKeypadTumbler.getColumn(index).currentIndex + " | uePinCode: " + uePinCode);
  18. } // for
  19.  
  20. // print(uePinCode);
  21. } // onClicked - gather Tumbler value
  22. } // ueButtonLogin
To copy to clipboard, switch view to plain text mode 
Sincerely,
Marko