[Interest] Difficulty running Timer from QThread

Thiago Macieira thiago.macieira at intel.com
Tue Jul 20 06:19:20 CEST 2021


On Monday, 19 July 2021 11:51:30 PDT Björn Schäpers wrote:
> Yes, and the Timer was created inside the VLCWorker::initVLC, and said
> worker was moved, but before initVLC, but initVLC was called in the moved
> from thread.

But the QTimer had no parent. From the OP:

rtspStartTimer=new QTimer;
rtspStartTimer->setSingleShot(true);
connect(rtspStartTimer, &QTimer::timeout,
        this, &VLCWorker::rtspStarting);

That means this QTimer wasn't moved and therefore was firing on the thread 
that created the object. Whichever that was.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Interest mailing list