How to insert QProgressBar in QTableWidget cell
General and Desktop
4
Posts
3
Posters
9.9k
Views
1
Watching
-
wrote on 19 Mar 2012, 12:37 last edited by
I want to display progress bar in QTableWidget cell, is it possible at all!
-
wrote on 19 Mar 2012, 14:36 last edited by
Try it :
@QTableWidget tw = new QTableWidget(1,1);
QProgressBar *pgbar = new QProgressBar();
tw.setCellWidget(0,0,pgbar);
@This example inserts a QProgressBar in a QTableWidget with one row and one column;
-
wrote on 19 Mar 2012, 18:13 last edited by
Thanks for the reply!
-
wrote on 20 Mar 2012, 08:49 last edited by
Or, take a look at libQxt. It has a "delegate":http://libqxt.bitbucket.org/doc/0.6/qxtitemdelegate.html that can do this without relying on adding widgets explicitly, and that works with data from the model itself.
4/4