Guest User

Untitled

a guest
Jun 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import QtQuick 1.1
  2. import org.kde.plasma.components 0.1 as PlasmaComponents
  3.  
  4. Item
  5. {
  6. id: root
  7. property QtObject documentController
  8. //property Item docRootItem
  9. Rectangle {
  10. width: 50; height: 200
  11. ListModel{
  12. id:testModel
  13. ListElement {
  14. name: "KingFisher"
  15. Brand: "UB group"
  16. }
  17. ListElement {
  18. name: "Haywords 5000"
  19. brand: "Haywords"
  20. }
  21. ListElement {
  22. name: "Foster"
  23. brand: "Aussie"
  24. }
  25. }
  26. Component {
  27. id: relationDelegate
  28. Rectangle {
  29. width: 180; height: 50
  30. color: "lightsteelblue"; radius: 5
  31. }
  32. }
  33. ListView {
  34. anchors.fill: parent
  35. height: width
  36. width: parent.width
  37. model: testModel
  38. delegate: Text { text: name }
  39. highlight: relationDelegate
  40. highlightFollowsCurrentItem: true
  41. focus: true
  42. //highlight: Rectangle { color: "lightsteelblue"; radius: 5}
  43. }
  44. }
Add Comment
Please, Sign In to add comment