[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] QPlainTextEdit: poor performance while hidding blocks
From: José_María_García_Pérez
Date: 2010-06-27 16:25:30
Message-ID: AANLkTimGwN9bTVamnqrmEV5qHaoU1QonHedRQw0HsxBo () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Dear all,
I am developping my first programme using PyQt4. It is a text editor based
on QPlainTextEdit, because I want good performance with big documents
(>80000 blocks). The performance is good so far, but when I hide blocks it
takes several minutes to update.
I have a function hiding different blocks by mean of:
block.setVisible(False)
Afterwards, I update the viewport:
self.viewport().update()
The loop setting the blocks visibility and the update execution is really
fast (less than a second). After that the application states stuck for
several minutes. Executing:
QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents)
doesn't help.
Any clue of what am I doing wrong?
May this be a bug in PyQt4?
Kind regards,
Jos=E9 M.
PS: I have more info about what I am doing here:
http://www.qtcentre.org/threads/31923-PyQt4-QPlainTextEdit-performance-when=
-hidding-blocks
[Attachment #5 (text/html)]
<div>Dear all,</div>I am developping my first programme using PyQt4. It is a text \
editor based on QPlainTextEdit, because I want good performance with big documents \
(>80000 blocks). The performance is good so far, but when I hide blocks it takes \
several minutes to update.<div> <br></div><div>I have a function hiding different \
blocks by mean of:</div><div>block.setVisible(False)</div><div><br></div><div>Afterwards, \
I update the viewport:</div><div>self.viewport().update()</div><div><br></div><div> \
The loop setting the blocks visibility and the update execution is really fast (less \
than a second). After that the application states stuck for several minutes. \
Executing:</div><div>QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents)</div>
<div><br></div><div>doesn't help.</div><div><br></div><div>Any clue of what am I \
doing wrong?</div><div><br></div><div>May this be a bug in \
PyQt4?</div><div><br></div><div>Kind regards,</div><div>José M.</div><div>PS: I have \
more info about what I am doing here: <a \
href="http://www.qtcentre.org/threads/31923-PyQt4-QPlainTextEdit-performance-when-hidd \
ing-blocks">http://www.qtcentre.org/threads/31923-PyQt4-QPlainTextEdit-performance-when-hidding-blocks</a></div>
<div><br></div><div> </div>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://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