Timesheets-Server
Timesheets server
Načítám...
Vyhledávám...
Nebylo nic nalezeno
mythread.cpp
Zobrazit dokumentaci tohoto souboru.
1
6#include "mythread.h"
7
8
9
10MyThread::MyThread(QObject *parent, const QString& name) : QThread(parent) {
11 setObjectName(name);
12 start();
13 connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
14}
15
16
17void MyThread::takeObject(QObject *parent, const QString& name, QObject *x) {
18 MyThread *thread = new MyThread(parent, name);
19 x->setParent(nullptr);
20 x->moveToThread(thread);
21 connect(x, SIGNAL(destroyed(QObject *)), thread, SLOT(quit()));
22}
23
24