replaced pl.pause in gui by qt processEvents