caduel
12th November 2009, 09:22
I want to detect if the user of my program has been idle the last X seconds (like a screensaver has to).
Is there anything in Qt that already does something like that?
(I have a working prototype that uses a QTimer and overrides QApplication::notify() to detect "user input events". But I would prefer to use an existing solution that is part of Qt.)
Which leads to a second question: is there some function that classifies a QEvent as "user input" or do I have to check against KeyPress, KeyRelease etc (which means the code will break if a new input event type is introduced)?
Best regards and thanks for thinking about my question.
Is there anything in Qt that already does something like that?
(I have a working prototype that uses a QTimer and overrides QApplication::notify() to detect "user input events". But I would prefer to use an existing solution that is part of Qt.)
Which leads to a second question: is there some function that classifies a QEvent as "user input" or do I have to check against KeyPress, KeyRelease etc (which means the code will break if a new input event type is introduced)?
Best regards and thanks for thinking about my question.