class test :public QWidget
{
public:
test();
private:
QPushButton *button1;
};
test::test()
{
button1 = new QPushButton;
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
test test1;
test1.show();
return app.exec();
}
为什么这样不能
显示出
button,,
如果家个布局就可以显示出来...
为什么会这样?搞不清楚这QWidget是干什么的。
[ 此帖被ag2011在2011-04-04 22:49重新编辑 ]