[Qt-interest] QVBoxLayout with 100s of items is hanging

Qt Quest qt.quest at yahoo.com
Thu Nov 26 12:51:55 CET 2009


Hi David,

Thanks for your response.
Indeed a text edit was my first thought and implementation, however I also have checkboxes etc. on every line that I have to interact with.
The performance of the QVBoxLayout seem to be of O(n^2) which is inefficient. I'm sure there's a simple bug fix to bring it up to O(n), but I dont know the class' internal too.

 
QLayout::invalidate is being called in the process which zeroes out the layout geometry.
Has anyone has any input on the layout internals?

Thanks in advance!




________________________________
From: David Ching <dc at remove-this.dcsoft.com>
To: qt-interest at trolltech.com
Sent: Thu, November 26, 2009 12:34:56 AM
Subject: Re: [Qt-interest] QVBoxLayout with 100s of items is hanging

"Qt Quest" <qt.quest at yahoo.com> wrote in message 
news:535032.46988.qm at web114003.mail.gq1.yahoo.com...
> Hi all,
>
> I'm using QT 4.5.0 to develop a GUI application, which needs to display 
> houndreds and
> sometimes thousands of text lines inside a QVBoxLayout. Each line is 
> QHBoxLayout with
> a rich text label. After show() is called on that window a flow of event 
> start that takes
>  *10s of seconds* until it is drawn.
>

I don't know the layout internals, but am not surprised they have 
performance issues with so many items.  I don't think a layout was designed 
for this.  Have you considered using a read-only QTextEdit to hold all these 
rich-text lines?

-- David



_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091126/cd629b54/attachment.html 


More information about the Qt-interest-old mailing list