Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How good is the HTML and CSS support in QTextBrowser
eirikm last edited by
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.
goetz last edited by
"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.
blex last edited by
[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