View Full Version : Long press event
alfah
12th August 2011, 11:28
hi all,
I jus want to know if there is a long press event available in Qt :)
The module im working on currently requires long press. I have seen long press in C7 for uninstalling
The click event and the press event gives the same result right?
alfah
MasterBLB
12th August 2011, 11:36
Check QAbstractButton::autoRepeat
alfah
12th August 2011, 12:10
I checked that out, could you give me some ideas as to how to go about it.
alfah
MasterBLB
12th August 2011, 14:54
If you provide more exact details about what you wish to archieve,then maybe I'll be able to help you
alfah
17th August 2011, 06:21
Sorry about not being clear. Yes, Im talking about key presses. I want to know to if there is a way to implement long key press. Ie if i click the button once it does an activity, if i press it twice it does another activity. These i have already done. Now I want to press and hold for some time to start yet another activity.
squidge
17th August 2011, 13:26
You can use a QTimer and use the 'press' and 'release' signals of the button to start and stop the timer. Once the timer reaches your time you can do whatever.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.