PDA

View Full Version : QTable widget works slow :(



THRESHE
27th February 2008, 12:29
Hello everyone

Recently a problem occurred in my application. I'm using QTableWidget to display information about downloads. My QTableWidget has 8 columns and each row has some data displayed as QTableWidgetItem and some data displayed as QLabel. The problem is that when the number of rows exceeds 20 scrolling is soooo slow :(
I've provided a screenshot of my tablewidget

wysota
27th February 2008, 12:34
Does the "progress" column contain QProgressBar widgets? If so, they are the cause of slowdowns.

Read this: http://www.qtcentre.org/forum/f-qt-programming-2/t-how-to-show-progess-in-a-qtreeview-item-2330.html

THRESHE
27th February 2008, 12:48
Thanks for reply it seems to be true but not only QProgressBar causes lags but QLabels also because when I removed them from my code app started to run faster. Anyway could you advise me what can I do about it ?

wysota
27th February 2008, 12:54
Every widget put inside the view will cause lags. It can all be avoided using a custom delegate like the thread I gave you suggests.