Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.89 KB | None | 0 0
  1. Window {
  2.     id: win
  3.     visible: true
  4.     width: 500
  5.     height: 200
  6.  
  7.     Rectangle {
  8.         color: "red"
  9.         anchors.top: parent.top
  10.         anchors.bottom: parent.bottom
  11.         anchors.left: parent.left
  12.         anchors.right: separator.left
  13.     }
  14.     Rectangle {
  15.         color: "blue"
  16.         anchors.top: parent.top
  17.         anchors.bottom: parent.bottom
  18.         anchors.right: parent.right
  19.         anchors.left: separator.right
  20.     }
  21.  
  22.     Rectangle {
  23.         id: separator
  24.         width: 2
  25.         x: parent.width/2
  26.         anchors.top: parent.top
  27.         anchors.bottom: parent.bottom
  28.         Drag.active: dragArea.drag.active
  29.         Drag.hotSpot.x: width
  30.         Drag.hotSpot.y: height
  31.         MouseArea {
  32.             id: dragArea
  33.             anchors.fill: parent
  34.             drag.target: parent
  35.             cursorShape: Qt.SizeHorCursor
  36.         }
  37.     }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement