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 a normal C++ main and not a QThread or a main using a QCoreApplication?
@slilly
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 aQTimerinstance? If you mean to useQTimerwithout an event loop (i.e. withoutQCoreApplication), well then, no you can't do that. -
Can QTimer be called from a normal C++ main and not a QThread or a main using a QCoreApplication?
@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().