Bien, usaremos el código del anterior post, pero ahora le haremos unas sencillas modificaciones para hacerlo más divertido.
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel(“<h2><i>Hello</i> “
“<font color=red>Qt!</font></h2>”);
label->show();
return app.exec();
}
Como podrán darse cuenta, cambiamos la línea que contiene
QLabel *label = new QLabel(“Hello Qt!”);
por
QLabel *label = new QLabel(“<h2><i>Hello</i> “
“<font color=red>Qt!</font></h2>”);
Con esta simple modificación obtuvimos la siguiente aplicación.
Etiquetas: ejemplos qt4, Widgets
