created an alarm using qml. we can't add 'am' and 'pm' to the last spinner. how can we add it?
Qt Code:
  1. import Qt 4.7
  2. import "content"
  3.  
  4. Rectangle {
  5.  
  6. width:238; height:197
  7. property int hr
  8. property int min
  9. property int am
  10. signal titleBarClicked(int hr,int min,int am)
  11.  
  12.  
  13. Row {
  14. y: 0; x:0; spacing: 20
  15.  
  16.  
  17. Image {
  18. id: image1
  19. source: "content/spinner-bgc.png"
  20.  
  21. }
  22.  
  23. }
  24.  
  25.  
  26.  
  27. Row {
  28. y: 0; x: 7; spacing:20
  29.  
  30. Spinner {
  31. id: spinner
  32. width:70; height: 197
  33. focus: false
  34. model: 13
  35. itemHeight: 30
  36. delegate: Text { font.pixelSize: 25; text: index; height: 30;font.bold:true;}
  37.  
  38.  
  39. }
  40. }
  41. Row {
  42. y: 0; x:77; spacing: 20
  43.  
  44.  
  45. Image {
  46. id: image2
  47. source: "content/spinner-bgc.png"
  48. }
  49.  
  50. }
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. Row {
  58. y: 0; x:84; spacing:20
  59.  
  60. Spinner {
  61. id: spinner2
  62. width:70; height: 197
  63. focus: true
  64. model: 60
  65. itemHeight: 30
  66. delegate: Text { font.pixelSize: 25; text: index; height: 30;font.bold:true;}
  67. }
  68.  
  69.  
  70.  
  71. }
  72. Row {
  73. y: 0; x:154; spacing: 20
  74.  
  75.  
  76. Image {
  77. id: image3
  78. source: "content/spinner-bgc.png"
  79. }
  80.  
  81. }
  82. Row {
  83. y: 0; x:161; spacing:20
  84.  
  85. Spinner {
  86. id: spinner3
  87. width:70; height: 197
  88. focus: true
  89. model: name
  90. itemHeight: 30
  91.  
  92. delegate: Text {font.pixelSize: 25; text: "PM"; height:30;font.bold:true;}
  93. Text {
  94. id: name
  95. text: ""
  96. }
  97.  
  98.  
  99.  
  100.  
  101.  
  102. }
  103.  
  104.  
  105.  
  106.  
  107.  
  108. }
  109. Row {
  110. y: 0; x:231; spacing: 20
  111.  
  112.  
  113. Image {
  114. id: image4
  115. source: "content/spinner-bgc.png"
  116. }
  117.  
  118. }
  119. Connections {
  120. target:titleBarClicked(spinner.currentIndex,spinner2.currentIndex,spinner3.currentIndex)
  121. }
  122.  
  123.  
  124. }
To copy to clipboard, switch view to plain text mode