[Eric] Re: Eric Digest, Vol 15, Issue 7
Cvetoslav Ludmiloff
ludmiloff at gmail.com
Thu Sep 20 14:28:51 BST 2007
Hi all,
Here is my little patch (sorry, a did not use any diff program, as changes
are so small)
in UI/Browser.py (line 125) replace the _resizeColumns method with:
def _resizeColumns(self, index):
try:
z = self.__cache_size
except:
self.__cache_size = 160 # default width for me
w = self.sizeHintForColumn(0)
if w == -1:
return
if abs(self.__cache_size-w) > 40: #
self.header().resizeSection(0, w)
self.__cache_size = w
Yes, I know, it is ugly, but works for me :)
But the problem seems to be a bit more complicated, as I found that the
ResizeSections(QHeaderView.ResizeToContents) is a fairly large and
time consuming procedure, at least in Qt4.3.1, see below
Andreas wrote:
> Do you have numbers
I did some time comparisons when using different libraries / distros on same
machine
AMD Sempron 3400+ 1.8GHz
the result (browsing middle size project - about 20 subfolders):
- When using Zenwalk -march=i486 -mtune=i686, QT4.3.1 PyQt4 - latest-devel,
QScintilla2 - latest-devel, eric4 - latest-devel, sip - latest-devel
expanding a branch - up to 1.5s
- when using the same library as abowe, but eric4 has been patched
expanding a branch - no more 1s, actualy varying from 0.2 to 0.8s
- When using Linuxmint (Ubuntu Feisty) QT4 2.3, PyQt4.1, QScintilla2 -
latest-devel, eric4 - latest-devel, no patch for eric
expanding a branch - no more 0.3sec and I'm hapy
So, it seems there is something wrong in QT4 library itself.
I'm still working to find out the differences between two ones;
Regards
Cvetoslav Ludmiloff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/eric/attachments/20070920/57e2e5ed/attachment.html
More information about the Eric
mailing list