@dheerendra Okay, done, thank you for reminding!
I tried some different options, and found a solution:
Maybe it can be easier, but i am still learning. Thanks for your input.
If you have comments on how to change my code, please tell me.
(newlog was only to test something else now)
I think that your question is not specifique enough
What you can do is to derive from QWidget (creating a new class)
In this class compose a QTimer object:
Then your widget is a empty box that have the functionality of a QTimer....
If you required that the QWidget has only one shot per click (guessing), you would like to use the static function SingleShot http://doc.qt.io/qt-5/qtimer.html#singleShot
@Mark81 The example works. Is there anything else that is missing ?
That's what the timer is for. If you press the key long enough then it will fire but if you release it quicker that the timeout, the timer will be cancelled, no need to measure the time between both events.
Remove the ":"
There is no built-in timer GUI component. However, you can run a QML Timer and use it to update the text in your GUI.
When does it start to show that A ?
@maximus Hi! Have a look at this blog post: https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/
@McLion Schöni Platz ! :)
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.