Hi,
What is the most appropriate method to change the system date (on Windows) programmatically using Qt4. I'm using Qt Creator 1.3.1.
Hi,
What is the most appropriate method to change the system date (on Windows) programmatically using Qt4. I'm using Qt Creator 1.3.1.
Use Windows API, GetLocalTime and SetLocalTime.
SYSTEMTIME localTime;
GetLocalTime(&localTime);
localTime.wHour = 21;
localTime.wMinute = 30;
if (SetLocalTime(&localTime) != 0)
{
// ok
}
else
{
// failed
}