[PyQt] QPlainTextEdit: poor performance while hidding blocks

José María García Pérez josemaria.alkala at gmail.com
Sun Jun 27 17:25:30 BST 2010


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é M.
PS: I have more info about what I am doing here:
http://www.qtcentre.org/threads/31923-PyQt4-QPlainTextEdit-performance-when-hidding-blocks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100627/c14355ac/attachment.html>


More information about the PyQt mailing list