QThread *thread = new QThread;Worker* worker = new Worker;worker->moveToThread(thread)connect (thread->started, worker->execScript);thread->start;
Device device = new Device;foreach(commands) do current command;