I have following ListView:
Qt Code:
  1. import QtQuick 2.5
  2. import QtQuick.Layouts 1.2
  3.  
  4. import si.mikroelektronika 1.0
  5.  
  6. Item
  7. {
  8. id: ueCategorySelector
  9.  
  10. clip: true
  11.  
  12. Rectangle
  13. {
  14. id: ueCategorySelectorWrapper
  15.  
  16. radius: 16
  17. gradient: Gradient
  18. {
  19. GradientStop
  20. {
  21. position: 0
  22. color: "#ffffff"
  23. } // GradientStop
  24.  
  25. GradientStop
  26. {
  27. position: 1
  28. color: "#000000"
  29. } // GradientStop
  30. } // Gradient
  31.  
  32. border.color: "#4682b4"
  33. border.width: 1
  34.  
  35. antialiasing: true
  36.  
  37. anchors.fill: parent
  38.  
  39. ColumnLayout
  40. {
  41. anchors.margins: parent.radius/2
  42.  
  43. spacing: 0
  44. antialiasing: true
  45.  
  46. anchors.fill: parent
  47.  
  48. ListView
  49. {
  50. id: ueCategoryListView
  51.  
  52. antialiasing: true
  53.  
  54. orientation: ListView.Horizontal
  55. clip: true
  56.  
  57. Layout.fillWidth: true
  58. Layout.fillHeight: true
  59. Layout.alignment: Qt.AlignHCenter|Qt.AlignVCenter
  60. Layout.margins: 8
  61.  
  62. spacing: 8
  63.  
  64. populate: Transition
  65. {
  66. NumberAnimation
  67. {
  68. property: "opacity"
  69. from: 0
  70. to: 1
  71. duration: 100
  72. } // NumberAnimation
  73. }
  74.  
  75. Component.onCompleted:
  76. {
  77. model=ueCategoriesModel
  78. } // Component.onCompleted
  79.  
  80. delegate: Rectangle
  81. {
  82. id: ueCategorySelectorDelegate
  83.  
  84. radius: 16
  85.  
  86. width: 256
  87. height: ueCategoryListView.height-2*Layout.margins
  88.  
  89. clip: true
  90.  
  91. border.color: "#4682b4"
  92.  
  93. antialiasing: true
  94.  
  95. gradient: Gradient
  96. {
  97. GradientStop
  98. {
  99. position: 0
  100. color: "#000000"
  101.  
  102. ParallelAnimation on color
  103. {
  104. id: ueCategorySelectorColorAnimation
  105.  
  106. loops: 1
  107. running: false
  108.  
  109. ColorAnimation
  110. {
  111. from: "#4682b4"
  112. to: "#000000"
  113. duration: 100
  114. } // ColorAnimation
  115. } // ParallelAnimation
  116. } // GradientStop
  117.  
  118. GradientStop
  119. {
  120. position: 1
  121. color: "#ffffff"
  122. } // GradientStop
  123. } // Gradient
  124.  
  125. MouseArea
  126. {
  127. id: ueDelegateMouseArea
  128.  
  129. anchors.fill: parent
  130.  
  131. onClicked:
  132. {
  133. ueCategorySelectorColorAnimation.running=true;
  134. ueProductsModel.ueUpdateProducts(model.ueRoleId)
  135. ueProductSelectorOpacityAnimator.running=true;
  136.  
  137. ueCategoryListView.currentIndex=index
  138. } // onClicked
  139. } // MouseArea
  140.  
  141. ColumnLayout
  142. {
  143. anchors.fill: parent
  144.  
  145. antialiasing: true
  146.  
  147. spacing: 8
  148.  
  149. Image
  150. {
  151. Layout.fillWidth: true
  152. Layout.fillHeight: true
  153. Layout.alignment: Qt.AlignHCenter|Qt.AlignTop
  154. Layout.topMargin: ueCategorySelectorWrapper.radius+4
  155.  
  156. fillMode: Image.PreserveAspectFit
  157.  
  158. horizontalAlignment: Image.AlignHCenter
  159. verticalAlignment: Image.AlignVCenter
  160.  
  161. antialiasing: true
  162. source: "image://ueCategoriesModel/"+model.ueRoleImage
  163. } // Image
  164.  
  165. Text
  166. {
  167. Layout.fillWidth: true
  168. Layout.fillHeight: true
  169. Layout.alignment: Qt.AlignHCenter|Qt.AlignBottom
  170. Layout.bottomMargin: ueCategorySelectorWrapper.radius+4
  171.  
  172. color: "#000000"
  173.  
  174. text: model.ueRoleName
  175. wrapMode: Text.WordWrap
  176. font.family: "Courier"
  177. textFormat: Text.RichText
  178.  
  179. font.bold: true
  180. font.pointSize: 10
  181.  
  182. horizontalAlignment: Text.AlignHCenter
  183. verticalAlignment: Text.AlignVCenter
  184. } // Text
  185. } // ColumnLayout
  186. } // delegate
  187. } // ListView
  188. } // ColumnLayot
  189. } // Rectangle
  190.  
  191. ListView.onAdd:
  192. {
  193. print("Add")
  194. }
  195. } // Item
To copy to clipboard, switch view to plain text mode 
Why does ListView not call populate transition?

Sincerely,
Marko