One way to do this is to call the application's processEvents() method every so often. You could try calling it after you read each line, though it might be a bit inefficient to do so. The global QApplication instance is available as the qApp object, or you can obtain it using QApplication.instance().