Guest User

Untitled

a guest
Jul 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import Qt 4.7
  2.  
  3. BorderImage {
  4. id: buttonbase
  5.  
  6. signal clicked
  7.  
  8. property bool pressed: hitbox.pressed && hitbox.containsMouse
  9.  
  10. source: pressed ? "button_down.png" : "button_up.png"
  11.  
  12. border.left: 50;
  13. border.right: 50;
  14.  
  15. MouseArea {
  16. id: hitbox
  17. anchors.fill: parent
  18. onClicked: parent.clicked()
  19. }
  20. }
Add Comment
Please, Sign In to add comment