前言:接下来会记录些Qt的学习笔记,笔记都是来自于Youtube上的一个教程,网址如下:
https://www.youtube.com/watch?v=6KtOzh0StTc&list=PL2D1942A4688E9D63&index=1
今天的内容是关于如何在Qt中使用HTML的,看以下例子:
#include <QApplication>
#include <QLabel>
int main(int argc, char* argv[])
{
QApplication app(argc,argv);
// QLabel *label = new QLabel("<b>hello</b> <i>world</i>");
// QLabel *label = new QLabel("<h2>hello</h2> <font color = red><i>world</i><font>");
QLabel *label = new QLabel("<h2>hello <font color = red><i>world</i><font></h2>");
label->show();
return app.exec();
}