Dear Friends;
Is there is any idea to check that when was last time keyboard is pressed.
Dear Friends;
Is there is any idea to check that when was last time keyboard is pressed.
First of all please stop posting non-Qt related questions in the Qt Programming section.
As for your question, take a look at the Win API function GetLastInputInfo.
There is a C# example here: http://www.codeproject.com/KB/cs/GetIdleTimeWithCS.aspx.
It is very easy to see how that API should be used.
You can store the value of current system Date/Time using with QDateTime QDateTime::currentDateTime () in the KeyPressEvent of any widget;
Define a object in your header file and then in the KeyPressEvent of your Widget.
it may helps!Qt Code:
{ latestTime=currentDateTime (); }To copy to clipboard, switch view to plain text mode
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
Aki Tomar (5th February 2008)
Bookmarks