RecordTable.qml 795 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import QtQuick 2.11
  2. Rectangle {
  3. id:root
  4. anchors.fill: parent
  5. property alias modelData: listModel
  6. GridView{
  7. id:gridview
  8. anchors.fill: parent
  9. anchors.margins: 5
  10. cellWidth:width/20
  11. cellHeight: height/10
  12. clip: true
  13. delegate: componet
  14. model: listModel
  15. Component {
  16. id:componet
  17. Rectangle{
  18. width:gridview.cellWidth-2
  19. height: gridview.cellHeight-2
  20. color: "#DFE2E6"
  21. radius: 3
  22. Text {
  23. id: name
  24. text: pressure
  25. anchors.centerIn: parent
  26. }
  27. }
  28. }
  29. ListModel{
  30. id:listModel
  31. }
  32. }
  33. }