Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import Qt 4.7
  2.  
  3. Item {
  4. width: 300
  5. height: 300
  6.  
  7. Text {
  8. id: myText
  9. anchors.fill: parent
  10. text: state == "check_all" ? "Select All" : "Deselect All"
  11.  
  12. MouseArea {
  13. anchors.fill: parent
  14. onClicked: {
  15. console.log("clicked")
  16. if ( state == "check_all" )
  17. state = "uncheck_all"
  18. else
  19. state = "check_all"
  20. }
  21. }
  22.  
  23. states: [
  24. State {
  25. name: "check_all"
  26. },
  27. State {
  28. name: "uncheck_all"
  29. }
  30. ]
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement