In the main thread I define the function as following :
for (size_t i = 0; i < 10; i++) { qDebug() << "Main thread: " <<