PDA

View Full Version : QTextBrowser, add support for custom tags



qtcos
29th December 2007, 14:19
Hi,

I am failry new to Qt, recently I needed to add support for extra tags in QTextBrowser, can anybody tell me if this is possible and if so how can it be done, I have looked over the documentation but could not find anything related to this there ... perhaps I am looking in the wrong place. :)

Help much appreciated.
Thanks
C

wysota
29th December 2007, 14:52
You mean like html tags? You'll probably want to take a look at QTextDocument and QAbstractTextDocumentLayout.

qtcos
29th December 2007, 15:11
Hi,

Yes html is what i am interested in, but i don't want to implement my own set, i want to extend the functionality of QTextDocumentLayoutPrivate which appears to be unavailable. I should probably also mention that I am using the pyhton binding for Qt. Thanks again,

Cheers,
C

wysota
29th December 2007, 16:43
You can't access the private classes. But you can subclass the abstract class and simply copy the code you need from the private implementation to your component. Of course translating it to python in your case...