在一个Dialog按下一个
按钮后的代码:
QPushButton * btn = new QPushButton(
QString("x"),this);
btn->setGeometry(QRect(30,30,30,30));
btn->show();
//this->update();
/**/
GridWidget * grid = new GridWidget(this);
.........
grid->setGeometry(QRect(100,30,500,500));
grid->show();
this->update();
btn能够正常在原Dialog中显示,而grid成了一个Dialog跳出来了。grid是从QWidget继承的。
[ 此帖被bondsman在2010-07-12 17:00重新编辑 ]