replaced p_thread with qt-based qthread