add a qt signal to finish the tread properly