完成发布
This commit is contained in:
@@ -81,6 +81,14 @@ int PanelWidget::getColumnCount()
|
||||
return this->columnCount;
|
||||
}
|
||||
|
||||
void PanelWidget::clearWidgets()
|
||||
{
|
||||
foreach (QWidget* w, widgets) {
|
||||
delete w;
|
||||
}
|
||||
widgets.clear();
|
||||
}
|
||||
|
||||
void PanelWidget::setWidget(QList<QWidget *> widgets, int columnCount)
|
||||
{
|
||||
this->widgets = widgets;
|
||||
@@ -94,7 +102,6 @@ void PanelWidget::setWidget(QList<QWidget *> widgets, int columnCount)
|
||||
foreach (QWidget *widget, widgets) {
|
||||
gridLayout->removeWidget(widget);
|
||||
widget->setVisible(false);
|
||||
delete widget;
|
||||
}
|
||||
|
||||
//重新添加到布局中并可见
|
||||
|
||||
Reference in New Issue
Block a user