Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Qt 4.7
- Item {
- width: 300
- height: 300
- Text {
- id: myText
- anchors.fill: parent
- text: state == "check_all" ? "Select All" : "Deselect All"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- console.log("clicked")
- if ( state == "check_all" )
- state = "uncheck_all"
- else
- state = "check_all"
- }
- }
- states: [
- State {
- name: "check_all"
- },
- State {
- name: "uncheck_all"
- }
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement