#include
#include
#include
#include
#include
#include
#include "hello.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
QWidget* pWidget = new QWidget;
QLabel label(pWidget);
label.setText(QObject::tr("同一个世界,同一个梦想!"));
QPushButton* btn = new QPushButton(QObject::tr("关闭"),pWidget);
QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget(&label);
layout->addWidget(btn);
pWidget->setLayout(layout);
QObject::connect(btn,SIGNAL(clicked()),pWidget,SLOT(close()));
pWidget->show();
return app.exec();
//hello w;
//w.show();
}
阅读(2939) | 评论(0) | 转发(0) |