Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How good is the HTML and CSS support in QTextBrowser

How good is the HTML and CSS support in QTextBrowser

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 7.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eirikm
    wrote on last edited by
    #1

    I have used QTextBrowser as a help viewer in my application, as descriped in an example in Qt Quarterly. It mostly works, but I have a few problems with styling. Margins and padding doesn't seem to work.

    I couldn't find any information about what is supported and what not. Does it exist, or is QTextBrowser so limited that something else should be used? WebKit seems like an alternative, but might be an overkill.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      "QTextBrowser":http://doc.qt.nokia.com/4.7/qtextbrowser.html is basically a read only version of "QTextEdit":http://doc.qt.nokia.com/4.7/qtextedit.html with some navigation functionality added. Both are not full-featured HTML browsers, as the internally rely on "QTextDocument":http://doc.qt.nokia.com/4.7/qtextdocument.html. If it does not work properly for you, go with WebKit. I don't see why this would be an overkill - it's just adding "webkit" to the QT variable in your .pro file and some 5 lines of additional code. It's not worth fiddling around the limitations of QTextBrowser.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • B Offline
        B Offline
        blex
        wrote on last edited by
        #3

        [quote author="Volker" date="1290446329"]I don't see why this would be an overkill - it's just adding "webkit" to the QT variable in your .pro file and some 5 lines of additional code[/quote]

        No overkill except application size. Large library is added to the dependencies, it is also memory-consuming. But for the desktop it shouldn't be a problem


        Oleksiy Balabay

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved