Solved Button timer
-
Hello,
I have a button that opens a form when clicked. I would like the button to be pressed if the cursor is over the button for 2 seconds. How could I do this ?
Thank you very much,
Alex
-
Hi,
You can do that with focusInEvent / focusOutEvent and either a QTimer or timerEvent combo.
Note however that it's going to likely be pretty strange for your users to have a dialog popping up just because they left the cursor on the button.
-
Thank you very much for your help !
-
Hi,
I created a timer but I get a warning in the design tab:
"This type (Timer) is not supported in the Qt Quick Designer (M204).
Any idea ?Timer { id:timer1 interval:1000 repeat:false running:false onTriggered:rectangle11.visible=true }
Thank you very much,
Alex
-
What version of Qt Creator are you using ?
There was a solved bug report about it here.
-
Qt Creator 4.2.0
Based on Qt 5.7.1 (MSVC 2015, 32 bit)
Build on Dec 9 2016 -
There might have been a regression.
-
Thanks, I will igrore this warning for now...