////////////////////////picture.h//////////////////////////
#ifndef HH
#define HH
#include <QtGui>
class picturePage:public QWidget
{
public:
picturePage();
QPushButton *addImageButton;
};
#endif
//////////////////picture.cpp//////////////////////////
#include "picture.h"
picturePage::picturePage()
{
addImageButton = new QPushButton(this);
}
//////////////////////main.cpp//////////////////////////
#include "picture.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
picturePage picturepage;
QObject::connect(picturepage.addImageButton,SIGNAL(clicked()),&picturepage,SLOT(close()));
picturepage.show();
return app.exec();
}