ReuseMaterialInfo.qml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import QtQuick
  2. // 可复用物资信息
  3. Component {
  4. id: reusematerialinfo
  5. Item {
  6. Rectangle{
  7. width: 250;
  8. height: 300;
  9. color: "#00ffffff"
  10. Rectangle {
  11. x: 25
  12. y: 25
  13. width: 200
  14. height: 300
  15. color: "#00ffffff"
  16. Image {
  17. x: 50
  18. y: 50
  19. width: 150
  20. height: 150
  21. visible: true
  22. source: model.png
  23. fillMode: Image.PreserveAspectFit
  24. }
  25. Text {
  26. x: 0
  27. y: 185
  28. width: parent.width
  29. height: 50
  30. visible: true
  31. text: model.name
  32. font.pixelSize: 30
  33. horizontalAlignment: Text.AlignHCenter
  34. verticalAlignment: Text.AlignVCenter
  35. color: "#ffffff"
  36. }
  37. Text {
  38. x: 0
  39. y: 250
  40. width: parent.width
  41. height: 25
  42. visible: true
  43. text: model.rfid
  44. font.pixelSize: 12
  45. horizontalAlignment: Text.AlignHCenter
  46. verticalAlignment: Text.AlignVCenter
  47. color: "#ffffff"
  48. }
  49. }
  50. }
  51. }
  52. }