Thread
:
onClicked to repeat when held
View Single Post
Fuzzillogic
2019-08-18 , 11:34
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"...
Quote & Reply
|
The Following 4 Users Say Thank You to Fuzzillogic For This Useful Post:
imaginaryenemy
,
Jordi
,
juiceme
,
taixzo
Fuzzillogic
View Public Profile
Send a private message to Fuzzillogic
Find all posts by Fuzzillogic