I solved my task himself, with signals and slots and using QtConcurrent::run().