My Qt application has multiple threads. One of which calls ui->SyncUI(), where ui is an object of class Interface : public QMainWindow and
void Interface::SyncUI() {
QWidget* bar_widget = ui.tableWidget->cellWidget(0,4);
QProgressBar* bar_widget2 = dynamic_cast <QProgressBar*> (bar_widget);
bar_widget2->setValue( (int)percentage );
}
This causes a runtime error :
QWidget::repaint: Recursive repaint detected
I found this https://qt-project.org/forums/viewthread/24921 but I don't quite understand why setting the bar widget value from anther thread is illegal.
Thanks!