Hi,
is it ok to move the object owning the thread to the thread? Like in the example below.
a.h:
QThread* m_pThread;
a.cpp:
m_pThread = new QThread;
this->moveToThread(m_pThread);
Thanks!
Hi,
is it ok to move the object owning the thread to the thread? Like in the example below.
a.h:
QThread* m_pThread;
a.cpp:
m_pThread = new QThread;
this->moveToThread(m_pThread);
Thanks!
This probably can be done, but why do you need this construct?
You probably have a design problem if you need this.
Instead of this, check QRunnable.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks