|
#include <qapplication.h>
#include <qpushbutton.h>
#include <qvbox.h>
#include <qfont.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QVBox mainwindow;
mainwindow.resize(200,120);
QPushButton hello( "Hello world!", &mainwindow );
hello.resize( 100, 30 );
QPushButton btnquit( "Some Chinese", &mainwindow );
btnquit.resize( 100, 30 );
btnquit.setFont(QFont("Simsun",12,QFont::Bold));
QObject::connect( &hello, SIGNAL(clicked()), &btnquit,
SLOT(animateClick()));
QObject::connect( &btnquit, SIGNAL(clicked()), &a,
SLOT(quit()));
a.setMainWidget( &mainwindow );
mainwindow.show();
return a.exec();
}
I don't know why it is luanma??? |
|