[Qt-interest] QBasicTimer in a QApplication?
John Weeks
john at wavemetrics.com
Wed Oct 27 23:39:31 CEST 2010
My application has need of periodic execution, so I learned about
QTimers. I made a QTimer as a member of my QApplication subclass and
connected it to a slot. Works fine.
Then I read about QBasicTimer, and read that it is light-weight.
Eventually, this is an application that needs the best possible
performance, so that sounds good. I wired up a QBasicTimer in my
QApplication subclass and it didn't work. I followed the Wiggly
example to write my event handler.
I moved my QBasicTimer to one of my widgets instead. Now it works!
Is there a problem with using QBasicTimer with a QApplication as the
object that handles the events?
I'm doing this on Macintosh with Qt 4.6.3. Haven't had a chance yet to
try this on Windows.
Regards, John Weeks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101027/4b4c40d7/attachment.html
More information about the Qt-interest-old
mailing list