#include <QApplication>
#include <QLabel>
int main(int argc,char* argv[])
{
QApplication app(argc,argv);
QLabel* label = new QLabel("<h2><i>xxx</i>""<font color=red>xxx</font></h2>");
label->show();
return app.exec();
}
#include <QApplication>
#include <QLabel>
#include <QPushButton>
int main(int argc,char* argv[])
{
QApplication app(argc,argv);
//QLabel* label = new QLabel("<h2><i>xxx</i>""<font color=red>xxx</font></h2>");
//label->show();
QPushButton* button = new QPushButton("quit");
QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit()));
button->show();
return app.exec();
}
QObject::connect prototype :
static bool connect(const QObject *sender, const char *signal,
const QObject *receiver, const char *member, Qt::ConnectionType =
#ifdef qdoc
Qt::AutoConnection
#else
#ifdef QT3_SUPPORT
Qt::AutoCompatConnection
#else
Qt::AutoConnection
#endif
#endif
);