How To Change Date and Time in windows from Qt Application
I want to know , how we can change system time from Qt application. I am using QDateTime with which we can get system time, is there any way to change the system time
Hi and welcome to devnet,
You can't as it's not something that is implemented (no matter what the platform) probably because it's an action that requires special privileges (i.e. root access).
You can find more information "here":https://msdn.microsoft.com/en-us/library/ms724942(v=vs.85).aspx on what to use for Windows
Thanks for the information. I will check on it .
Is there any way in Qt with which we can detect time format change in system.
I want to update my existing QDatetime value to reflect the same.
example : if we change system time from 24hr to 12 hr format
Not that I know of, but since your on Windows you can use the winEventFilter function and implement the detection yourself