#include <QApplication>
#include <QPushButton>
#include <QWidget>
class wt:public QPushButton
{
public:
int Wt();
};
int wt::Wt()
{
QPushButton *s=new QPushButton;
QWidget *w=new QWidget;
s->setParent(w);
QObject::connect(s,SIGNAL(clicked(bool)),this,SLOT(puit()));
}
int main(int rage,char *ragv[])
{
QApplication a(rage,ragv);
wt s;
s.show();
return a.exec();
}
#include <QPushButton>
#include <QWidget>
class wt:public QPushButton
{
public:
int Wt();
};
int wt::Wt()
{
QPushButton *s=new QPushButton;
QWidget *w=new QWidget;
s->setParent(w);
QObject::connect(s,SIGNAL(clicked(bool)),this,SLOT(puit()));
}
int main(int rage,char *ragv[])
{
QApplication a(rage,ragv);
wt s;
s.show();
return a.exec();
}