KMenuItem.qml 645 B

1234567891011121314151617181920212223242526272829303132
  1. import QtQuick 1.1
  2. Rectangle {
  3. id: root
  4. property alias text: label.text
  5. signal clicked
  6. objectName: "kMenuItem"
  7. height: 60
  8. width: parent.width
  9. color: "transparent"
  10. KLabel{
  11. id: label
  12. anchors.fill:parent
  13. anchors.leftMargin: 20
  14. anchors.verticalCenter: parent.verticalCenter
  15. verticalAlignment: Text.AlignVCenter
  16. }
  17. MouseArea{
  18. id: mouseArea
  19. anchors.fill:parent
  20. onClicked: root.clicked()
  21. }
  22. Rectangle{ //This is a line in fact
  23. width:root.width
  24. height:1
  25. anchors.bottom:parent.bottom
  26. color: "#8f00FF"
  27. }
  28. }