[PyQt] faster alternative to QHeaderView's resizeToContents?
Demetrius Cassidy
dcassidy36 at mass.rr.com
Sun May 10 00:23:26 BST 2009
Are you calling resizeToContents for each item in your table?
Sent from my iPhone
On May 9, 2009, at 3:28 AM, Edwin Marshall <aspidites at inbox.com> wrote:
> I have a QTableView that displays the contents of a model with over
> 3000 rows, each with 11 columns. I'd like to the original size of
> these columns to be no larger than the content within them, but
> setting their resizeMode's to QHeaderView.resizeToContents causes
> the tremendous slow downs (where originally the data would load in
> two seconds, using this mode causes the data to be loaded after
> about a minute and a half). Is there some faster alternative?
>
> I'm thinking of calculating the width by using the length of the
> largest item in the column, but that would require me to know how
> large in pixels each character is.
>
> Any suggestions? Mean while, I'm going to stare at the Qt
> documentation for a couple more hours to see if I find something.
> Get Free 5GB Email – Check out spam free email with many cool featur
> es!
> Visit http://www.inbox.com/email to find out more!
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090510/fa38111e/attachment.html
More information about the PyQt
mailing list