Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.74 KB | None | 0 0
  1. Button {
  2.     id: control
  3.     width: 48; height: 48
  4.     property real offset: 16
  5.  
  6.     onClicked: if (!menu.opened) menu.open()
  7.     Menu {
  8.         id: menu
  9.         x: control.width + control.offset
  10.         delegate: MenuItem { }
  11.         // Some Actions
  12.     }
  13.  
  14.     Shape {
  15.         id: shape
  16.         x: control.width
  17.         y: 0.5*control.height - 0.5*height
  18.         width: control.offset; height: control.offset
  19.         visible: menu.opened
  20.         ShapePath {
  21.             fillColor: "red"
  22.             strokeWidth: 5
  23.             strokeColor: "red"
  24.             startX: 0; startY: 0.5*control.offset
  25.             PathLine { x: control.offset; y: control.offset }
  26.             PathLine { x: control.offset; y: 0 }
  27.             PathLine { x: 0; y: 0.5*control.offset }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement