{
public:
demo
(QWidget *parent
=0,
const char *name
=0);
~demo();
public slots:
void change();
};
demo
::demo(QWidget *parent,
const char *name
):{
setMinimumSize(640,480);
clear->setGeometry(10,10,50,20);
connect(clear,SIGNAL(clicked()),this,SLOT(change()));
}
demo::~demo()
{
}
void demo::change()
{
printf("\n change \n");
}
class demo: public QWidget
{
public:
demo(QWidget *parent=0,const char *name=0);
~demo();
public slots:
void change();
};
demo::demo(QWidget *parent,const char *name):
QWidget(parent,name)
{
setMinimumSize(640,480);
QPushButton *clear= new QPushButton("clear",this,"clear");
clear->setGeometry(10,10,50,20);
clear->setFont(QFont("Times",12,QFont::Bold));
connect(clear,SIGNAL(clicked()),this,SLOT(change()));
}
demo::~demo()
{
}
void demo::change()
{
printf("\n change \n");
}
To copy to clipboard, switch view to plain text mode
Bookmarks