qDebug()<<"%%%%%%%%%%%%%%%%%%%"<<" "<<this->mainLayout->count();
while(mainLayout->count())
{
QWidget *p=this->mainLayout->itemAt(0)->widget();
p->setParent (NULL);
this->mainLayout->removeWidget(p);
delete p;
}
qDebug()<<"################"<<" "<<this->mainLayout->count();本文出自 “叶子” 博客,请务必保留此出处http://luoqiu.blog.51cto.com/2198651/1702493
原文:http://luoqiu.blog.51cto.com/2198651/1702493