I want to detect the event when the system clock changes. I am working on windows.
If there is not any way in Qt, please guide me where to find a way
I want to detect the event when the system clock changes. I am working on windows.
If there is not any way in Qt, please guide me where to find a way
I don't if there is such an event.
But what you can do, is have a timer call a slot every half a second and get the system time.
If the time has changed in more then one second, you know someone has changed the system time.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
thank u alot
this will be my last choice
any more intelligent way ?
Sure, but the more intelligent ways will add a lot of OS-specific code to your project. By far the easiest to implement and least OS-specific way is to just query the time once a second and check yourself.
thank u both , I will do it
there is an event in linux when the time changes using external sources or an app, see this link, may be there is something similar in windows
https://lkml.org/lkml/2010/9/16/405
Bookmarks