QT QLayout 清空

1 QLayout* pLayout = (QLayout*)ui->frame->layout();
2 while(child = pLayout->takeAt(0))
3 {
4     QWidget* pWidget = child->widget();
5     pWidget->deleteLater();
6     delete child;
7 }
posted @ 2018-03-14 13:40  程序员大叔  阅读(1122)  评论(0编辑  收藏  举报