[Interest] Difficulty running Timer from QThread

Björn Schäpers qt-maillist at hazardy.de
Mon Jul 19 20:51:30 CEST 2021


Am 19.07.2021 um 17:57 schrieb Thiago Macieira:
> On Sunday, 18 July 2021 23:08:13 PDT Björn Schäpers wrote:
>> you should parent your QTimer, and moveToThread afterwards.
> That shouldn't be "AND". That should be an exclusive OR: you either parent
> your QObject or you moveToThread, not both. You cannot move a QObject that has
> a parent to another thread. You can only move the entire hierarchy.
>
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.



More information about the Interest mailing list