View Single Post
Posts: 479 | Thanked: 1,284 times | Joined on Jan 2012 @ Enschede, The Netherlands
#2
Buttons have a "down" property. IIRC you can set a onDownChanged event handler. If down == true, set an interval using javascript's setInterval, in which you increase/decrease the brightness every x milliseconds. Clear the interval when down gets false.

The documentation refers to MouseArea, which give you the "pressed" property, and thus onPressed and onReleased. I'm not sure whether Button inherits these tho.

Incidentally, Qt 5.9 introduced "pressAndHold"...
 

The Following 4 Users Say Thank You to Fuzzillogic For This Useful Post: