- 论坛徽章:
- 0
|
#include
#include
int main(int argc, **argv)
{
QApplication app(argc,argv);
QPushButton *b;
b=new QPushButton("hello",0); //error if 0 is missed.
//new returns a pointer to a object, thus *b can be taken as the class itself
app.setMainWidget(b);
b->show();
//b is a pointer so ->, app is the object so .
return app.exec();
}
///////////////
//b->setIconSet(QPixmap::fromMimeSource(wgz.png));
//b->setGeometry(20,20,30,30); //note 4 parameter are needed
//the lines works
//////////////////
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/56913/showart_681675.html |
|