Unsolved QTimer from a non QThread
-
Can QTimer be called from a normal C++ main and not a QThread or a main using a QCoreApplication?
-
Can QTimer be called from
What does this mean?
A timer object will generate thetimeout()
signal at (almost) regular intervals, you can subscribe to that and do whatever you want. What do you want to call from aQTimer
instance? If you mean to useQTimer
without an event loop (i.e. withoutQCoreApplication
), well then, no you can't do that. -
@slilly said:
Can QTimer be called from a normal C++ main and not a QThread or a main using a QCoreApplication?
No. If you want to use QTimer, then you need
QCoreApplication::exec()
orQThread::exec()
.