QT练习1:QT中还可以支持HTML语言,比较好玩
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QLabel hello("<h2><i>hello</i> <font color=red>QT!</font></h2>",0);
hello.show();
return app.exec();
}
效果如下:
![](https://pic002.cnblogs.com/images/2011/115749/2011052118285814.png)
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QLabel hello("<h2><i>hello</i> <font color=red>QT!</font></h2>",0);
hello.show();
return app.exec();
}