Displaying (rendering) HTML from a string in QT

I have html in QString, which widget can I use to display it? (QWebView is not required because I do not have access to the Internet)

+4
source share
2 answers

Depending on which HTML tags you use, you may want to get away with QTextEdit . It supports most of HTML, including tables and images. Check out the docs and see if it suits your specific needs.

If you need something more advanced, you will have to use widgets in QtWebKit .

+5
source

QWebView setHtml() :

The QWebView class provides a widget that is used to view and edit web documents.

Qt has a QWebView widget that displays pages for you - if you don't need the network features it provides, just don't use them.

+5
source

Source: https://habr.com/ru/post/1307954/


All Articles