View Single Post
Posts: 17 | Thanked: 8 times | Joined on Jul 2010
#3
Thanks for the quick reply !

This seems like a good idea. Actually, I thought about this too However, I see two drawbacks to this :

- I don't know how many characters/lines I should keep since I don't know the size of the QTextBrowser widget. Sure, I could do some trial and error on my N900, but I'd like to keep the application portable if possible, so I can test it and use it on my desktop computer. Besides, the HTML I want to display might contain images, which would certainly mess up any computation based on number of characters.

- If I use this method, I fear that I might break some of the handy built-in features of the QTextBrowser, such as automatic handling of hypertext links. Right now, in my 15-lines-or-so application, I already have a fully working local HTML browser, which is quite amazing.


Bottom line is : I'd prefer a GUI-level solution, if possible, to avoid messing up with the actual text content. But if such a solution does not exist, I will probably end up implementing your trick.