There is the following code (most part omitted):

import mymodule class App(QMainWindow): def __init__(self, parent=None): super(App, self).__init__(parent) self.create_widget = CreateFrames(self) self.setCentralWidget(self.create_widget) self.initUI() def initUI(self): start = QAction(QIcon('start.png'), 'Начать', self) start.triggered.connect(self.start) toolbar=self.addToolBar() toolbar.addAction(start) def print_information(self): self.create_widget.textBottom.append('London is the capital of Great Britain') def print_errors(self): self.create_widget.textBottom.append('Ошибочка вышла!') def start(self): self.create_widget.textBottom.append('\nНачало работы...') mymodule.method1() self.print_information() mymodyle.method2 self.create_widget.textBottom.append('Мы на полпути') mymodyle.method3 self.print_errors() self.create_widget.textBottom.append('Почти всё') mymodyle.method4 self.create_widget.textBottom.append('Готово') class CreateFrames(QWidget): def __init__(self, parent): super().__init__(parent) self.initFr() def initFr(self): self.textEdit = QTextEdit() 

The problem is this: the start method uses the functions of the connected module and can take a long time to complete. At this time, the program "freezes". In order not to frighten the user with this, it is necessary to show him some information in one of the program windows during the program. But such an idea does not work: the information is not given out sequentially, but the whole is spat after the completion of the start method. What can be done?

And is there any means in pyqt for creating a text field in the program, an analogue of the command line with the output of data through normal print, so that it can output data from a connected module during the execution of some of its functions?

0