PDA

View Full Version : QTableWidget with many cellwidgets update very slow!



linxs
17th November 2012, 16:43
I have a QTablWidget which has 10 columns and about 100-200 rows. Every row has 3 cellwidgets of QLabel type.
The problem is the qtablewidget udpate very slow, taking more than 5 seconds.
I want the update quickly.
How can I improve its performance??
ThankS!

wysota
18th November 2012, 02:43
Don't use cell widgets.

linxs
18th November 2012, 05:06
I want to implement customized drag and drop for item in qtablewidget, so I use qlabel as cellwidget.
If no use cellwidget, then what to use?

wysota
18th November 2012, 05:51
I want to implement customized drag and drop for item in qtablewidget, so I use qlabel as cellwidget.
If no use cellwidget, then what to use?

You don't need cell widgets to have custom drag and drop. QTableWidget already offers required facilities. Even more is offered if you use a proper model-view approach (i.e. QTableView nad QAbstractTableModel subclass instead of QTableWidget).

linxs
19th November 2012, 07:01
Thanks!

Where can I find a simple expample of QTableView which implement drag and drop?
I googled, but not found.