Why don't you use QThread for this job?