Unsolved How to set an external clock as clock basetime?
-
I'd like to use an RTC as basetime for a QTextLabel in which I place a textual clock.
How I can use it?
Someone could give me a step-by-step procedure to insert it.
I tried as QProcess: time is visible but my qtextlabel shows statically the time at the bootup only.
ùThanks in advance
Paolo -
Hi,
Do you mean something like the digital clock example ?
-
Something like this, but with an external basetime (in my case basetime is an RTC that I query with "hwclock -r" instead internal QTimer set with 1 sec).
How to connect it ? -
@alsa The usual way is to use the hwclock to set the system time once, then rely on the system time.
You can easily combine a QTimer to update the display with
QTime::currentTime()
to display your time. -
@aha_1980 said in How to set an external clock as clock basetime?:
QTime::currentTime()
Exactly This !!!
SOLVED !!!!
thanks aha_1980 -
@alsa said in How to set an external clock as clock basetime?:
SOLVED !!!!
So don't forget to mark your post as such!