You'll likely need to do a little more work than I did to get decent performance depending on how much of QTextEdit's functionallity you want to keep around. I didn't dig deeply into QTextEdit source, but based upon seeing how it probably worked on paragraphs at a time, I decided it was better to make my own QTextEdit-like widget. During this time I was putting large paragraphs of HTML for QTextEdit to mess with. Small paragraphs worked just fine.
In my console app, the problem that I had was that I was often sending large paragraphs of HTML to the QTextEdit and it was taking waaaay too long for it to process them and paint the widget.
The end result of my efforts was to get rid of HTML stuff (less overhead) and do my own painting. You might not need to do your own painting, I did it largely because QTextEdit was just way too slow for the performance level I was gearing for.
I basically just made a widget that inherited from QWidget so that I could do my own painting based upon only the data I wanted it to work with, unlike working with an entire paragraph. The end result for me was much faster. Just a side note, the painting speed in Qt 4.4.0 is much improved from earlier 4.x versions.
Hope that helps,
Paul




Reply With Quote
Bookmarks