在QT中显示(渲染)来自字符串的HTML [英] Displaying (rendering) HTML from a string in QT

查看:57
本文介绍了在QT中显示(渲染)来自字符串的HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在QString中有html,可以使用什么小部件来显示它?(因为我不访问Internet,所以不需要QWebView)

I have html in a QString, what widget can I use to display it? (QWebView is not necessary as I dont access Internet)

推荐答案

QWebView s setHtml() :

QWebView类提供了一个小部件,用于查看和编辑Web文档.

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

在Qt中, QWebView 是为您呈现页面的 小部件-如果您不需要它提供的联网功能,请不要使用它们.

In Qt QWebView is the widget that renders pages for you - if you don't need the networking features it provides, simply don't use them.

这篇关于在QT中显示(渲染)来自字符串的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆