#include <QtWidgets\QtWidgets>
class MyWidget:public QWidget
{
public:
MyWidget(QWidget *parent=0);
};
MyWidget::MyWidget(QWidget *parent):QWidget(parent)
{
this->setWindowTitle("My First Qt Program!");
this->resize(960,520);
QLabel *label=new QLabel(this);
label->setStyleSheet("color:green;background-color:rgb(236,255,236);");
label->setText("I Love C++ and Qt!");
}
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
app.setFont(QFont("Arial",36,QFont::Bold,false));
MyWidget widget;
widget.show();
return app.exec();
}