Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Item {
- id: nodeContainer
- width: parent.width
- height: rect.height
- property bool isExpanded: false
- property int childrenHeight: 0
- property int dpm: Screen.pixelDensity
- signal toggled(bool expanded, int newHeight)
- Rectangle {
- id: rect
- width: parent.width
- height: 9 * dpm
- color: "orangered"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- isExpanded = !isExpanded
- nodeContainer.toggled(isExpanded, childrenHeight)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement