I have a QTextEdit that I'm adding text to with insertHtml(). Its a combination of plaintext and true html thats added with that method. I'm using the QTextEdit as a logfile viewer of sorts. The trouble that I have is after a while, the QTextEdit has lots and lots of text in it. I want to create a cap on the number of lines that the QTextEdit displays.
For starters, I need to get the number of text lines. What is confusing is that I call QTextEdit->document()->blockCount() and it always returns 1. I tried the more obvious lineCount() and it too returned 1. However the characterCount() returns what looks like a correct value.
Theres like 100+ lines of text. Any ideas why blockCount is returning 1?
Paul
Bookmarks