If you are using QTableView , I assume that you are using the model associated with this view.
One solution would be to use delegates (see QItemDelegate ) to draw progress. In the QItemDelegate::paint method that you must define, use the widget's QStyle ( widget->style() ) to draw progress (use QStyle::drawControl with QStyle::CE_ProgressBarContents as the control identifier).
Check the documentation from the Star Delegate example to find out how to determine the delegate for the desired column.
Later editing: Example of defining a delegate drawing method (sketching code that has not been tested, takes it as a principle, does not fully work).
void MyDelegate::paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const { QStyleOptionProgressBar progressStyle; progressStyle.rect = option.rect;
source share