class cStorage: public QObject{public: cStorage(); ~cStorage(); void Write(QByteArray Package);};
Storage = new cStorage();QThread *thread = new QThread();Storage->moveToThread(thread);thread->start();
Storage->Write(Package);
Storage = new cStorage(); QThread *thread = new QThread(); Storage->moveToThread(thread); thread->start(); connect(this,SIGNAL(SignalWriteToStorage(QByteArray)),Storage,SLOT(Write(QByteArray)),Qt::QueuedConnection);