Advertisement
Guest User

Untitled

a guest
Oct 17th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. import QtQuick 1.0
  2.  
  3. Rectangle {
  4. width: 360
  5. height: 360
  6.  
  7. id: container
  8.  
  9. Text {
  10. id: text
  11. //anchors.centerIn: parent
  12. anchors.horizontalCenter: parent.horizontalCenter
  13. anchors.verticalCenter: parent.verticalCenter
  14. text: "Hello World"
  15. }
  16.  
  17. MouseArea {
  18. id: area
  19. anchors.fill: parent
  20. }
  21.  
  22. states: State {
  23. when: area.pressed
  24. PropertyChanges {
  25. target: text
  26. anchors.verticalCenter: undefined
  27. anchors.bottom: text.parent.bottom
  28. }
  29.  
  30. /*AnchorChanges {
  31. target: text
  32. anchors.verticalCenter: undefined
  33. anchors.bottom: container.bottom
  34. }*/
  35. }
  36. }
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement