[Interest] QThread

Tomasz Olszak olszak.tomasz at gmail.com
Mon Mar 24 12:59:10 CET 2014


2014-03-24 12:38 GMT+01:00 Graham Labdon <Graham.Labdon at avalonsciences.com>:
> Hi
> I am experimenting with QThreads
> The basic idea is to have a thread performing some task and to have a button on the UI that can stop this operation
>
> So I have a class that will perform the operation called GeneratorThread that has a start slot
> In the main ui class I create an instance of the class -
>
> m_generatorThread = new GeneratorThread(this);
>
> Then I call moveToThread  and make the connections-
> m_generatorThread->moveToThread(m_thread)

This won't work because m_generatorThread has parent. See QObject docs
moveToThread.
Am I right assuming GeneratorThread does not inherit QThread?

Regards,
Tomasz Olszak
Qt for Tizen | http://qt-project.org/wiki/Tizen



More information about the Interest mailing list