完成发布

This commit is contained in:
2025-03-27 00:56:01 +08:00
parent 8b8b70c671
commit 694f182918
18 changed files with 476 additions and 92 deletions

View File

@@ -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;
}
//重新添加到布局中并可见

View File

@@ -60,6 +60,7 @@ public:
QList<QWidget *> getWidgets();
int getColumnCount();
void clearWidgets();
public Q_SLOTS:
@@ -70,6 +71,7 @@ public Q_SLOTS:
void setAutoWidth(bool autoWidth);
void setAutoHeight(bool autoHeight);
};
#endif // PANELWIDGET_H