The problem is that you create a timer implicitly by the main thread when creating the stream object. This is because your timer is a member of your thread class.
When you try to start the timer, you make another thread (in run() ), and not in the thread where the timer was created, which gives you a warning.
You need to create a timer in the stream where you want to start it :. Modify the m_notificationTimer in your NotificcationThread class from
QTimer m_NotificationTimer;
to
QTimer* m_NotificationTimer;
and create a timer in run() with
m_NotificationTimer = new QTimer(this); m_NotificationTimer->setInterval(interval); m_NotificationTimer->start();
source share