I have a QTableView
connected to a QAbstractTableModel
.
The model is used with QtConcurrent::map
to make threads for the application (copying files)
I subclassed QStyledItemDelegate
to display a QStyleOptionProgressBar
in one of the tableviews cells, and the idea was to update the progress bar via the model. It works, but from 0 to 100% in one go, not smooth.
QAbstractTableModel::setData()
is called in my "copy loop", but it seems that QAbstractTableModel::dataChanged()
is only emitted when the loops ends. No matter what I do.
This might be a wrong approach, but I have no clue how to access a given progress bar in the table view from a thread.