Replace QThread with threading.Thread.