How can I change a QLabel
in an infinite loop? Those. it is necessary to update QLabel
, but if you cram such a cycle into the code, QTGui
not initialized.
2 answers
After each update, call processEvents
|
First, first initiate and display a window with your QLabel, and only after that in a separate function, implement a change in QLabel. brief example
app = QApplication ([]);
wnd = Window ();
wnd.show ();
wnd.labelProgress ();app.exec_ ();
|