[Development] QTableView gets freezed in showing data read from SQLite database , which is updated dynamically with 2000 rows in 2s

Milian Wolff milian.wolff at kdab.com
Sun Jul 10 13:25:48 CEST 2016

On Samstag, 9. Juli 2016 23:31:19 CEST swarit wipra wrote:
> Hi folks,
> i have issues in showing huge data in QTableView ,data read from sqlite
> database which is being updated dynamically .. 2k rows in 2s.
> i am using QSQLRelationModel
> let me describe the scenario in detail.
> My Qt application has a view i.e QTableView , each row has following
> structure:
>  ****************************************
>  *QPushButton*|QLabel | QLabel | QLabel *
>  ****************************************
>  i have created it using QItemDelegate
>  each row isinserted dynamicaly , after sometime gui gets freezed.
> could anyone tell me the way to fix the issue.

Profile the code, find the hotspot, fix it.

From the above, it becomes clear already that you should not be using QLabel 
for plain text delegates but rather the default delegate.


Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5903 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160710/06ae2f0a/attachment.bin>

More information about the Development mailing list