Im working with threads. In the following code, i read datas from txt and run it on my thread. I want to use another thread for writing the datas another txt file. How can i do it?
mythread.cpp
Qt Code:
#include "mythread.h" #include <QtCore> #include <QDebug> #include <QFile> MyThread::MyThread() { } void MyThread::run() //Reading file from txt with thread1 { { while (!in.atEnd()) { { double num = entry.toDouble(); qDebug()<<num; queue.enqueue(num); } // for } // while } // if file.close(); }To copy to clipboard, switch view to plain text mode
Bookmarks