10MyThread::MyThread(QObject *parent,
const QString& name) : QThread(parent) {
13 connect(
this, SIGNAL(finished()),
this, SLOT(deleteLater()));
17void MyThread::takeObject(QObject *parent,
const QString& name, QObject *x) {
19 x->setParent(
nullptr);
20 x->moveToThread(thread);
21 connect(x, SIGNAL(destroyed(QObject *)), thread, SLOT(quit()));