[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] [pyqt]Low speed of qtablewidget.resizeRowsToContents
From:       Florian Bruhin <me () the-compiler ! org>
Date:       2018-07-15 15:00:07
Message-ID: 20180715150007.6s2zwdhhyvd5xebz () hooch ! localdomain
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Sun, Jul 15, 2018 at 07:14:06PM +0430, Maziar Parsijani wrote:
>  Hi
> I  have some data in file.xlsx and I read from it. When I use
> resizerowstocontents for text data(for example more than 50 rows)
> the operation is getting slower when the more rows added.

That seems expected. To resize the row to the longest content, Qt will
have to calculate the size needed for every item.

It seems like you can use QHeaderView::setResizeContentsPrecision to
tell it to look at less items though:

https://doc.qt.io/qt-5/qheaderview.html#setResizeContentsPrecision

Florian

--=20
https://www.qutebrowser.org | me@the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/

["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic