Results 1 to 4 of 4

Thread: QTextBrowser, add support for custom tags

  1. #1
    Join Date
    Dec 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QTextBrowser, add support for custom tags

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextBrowser, add support for custom tags

    You mean like html tags? You'll probably want to take a look at QTextDocument and QAbstractTextDocumentLayout.

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextBrowser, add support for custom tags

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextBrowser, add support for custom tags

    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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.