[Qt-interest] QTimer issue
Malyushytsky, Alex
alex at wai.com
Wed Jan 19 22:18:19 CET 2011
You can for example keep tracking of days yourself.
I would create QObject derived class which would start timer for maximum amount of time requested or 24 hours (whatever is less).
Keep time you need your timer to run in the variable of whatever type you prefer - QDateTime, unsigned long, etc.
Connect timer signal to the slot which would adjust time left and either emit one signal that will notify user
that time expired or start another timer.
AFAIK I know int is used for simplicity in Qt interfaces whenever it is possible.
I doubt it will change in a nearest future if ever.
Alex
-----Original Message-----
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Michael S
Sent: Wednesday, January 19, 2011 12:31 PM
To: qt mailing list
Subject: [Qt-interest] QTimer issue
Good day all,
I am writing a service type application that schedules its own events. I use the QTimer object to program the events and connect the timeout() signal to a slot that executes my logic. Unfortunately QTimer::start takes an int, which limits me to about 24 days, thus preventing me to scheduling a monthly event. I understand that QTimer was probably not intended for this type of usage, but having a long (or uint) argument type for start() would have been helpful. In any case, what would be the easiest solution?
Thanks,
Michael
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list