#include "debugworker.h" DebugWorker::DebugWorker() { runCounter = 0; } void DebugWorker::processWork() { qDebug() << "Working in Thread:" << QThread::currentThreadId(); // Attention: We allocate nearly 80 Megabytes of memory to slow // down the thread for demonstration purposes! double* workLoad = new double[10000000]; for (int i = 0; i < 10000000; i++) { workLoad[i] = (3.141 * (double)i) / 2.241; } delete[] workLoad; qDebug() << "Finished run:" << runCounter; runCounter++; }