|
@@ -28,9 +28,7 @@ void ExpertManageView::showEvent(QShowEvent *event)
|
|
|
void ExpertManageView::hideEvent(QHideEvent *event)
|
|
|
{
|
|
|
QWidget::hideEvent(event);
|
|
|
- if (m_expertInfoWidget && m_expertInfoWidget->isVisible()) {
|
|
|
- m_expertInfoWidget->close();
|
|
|
- }
|
|
|
+ hideExpertInfo();
|
|
|
}
|
|
|
|
|
|
void ExpertManageView::init()
|
|
@@ -108,9 +106,18 @@ void ExpertManageView::showExpertInfo(ExpertInfoWidget::Mode mode)
|
|
|
|
|
|
if (m_expertInfoWidget->isVisible() == false) {
|
|
|
m_expertInfoWidget->clearInputs();
|
|
|
- m_expertInfoWidget->setMode(mode);
|
|
|
+
|
|
|
m_expertInfoWidget->show();
|
|
|
}
|
|
|
+
|
|
|
+ m_expertInfoWidget->setMode(mode);
|
|
|
+}
|
|
|
+
|
|
|
+void ExpertManageView::hideExpertInfo()
|
|
|
+{
|
|
|
+ if (m_expertInfoWidget && m_expertInfoWidget->isVisible()) {
|
|
|
+ m_expertInfoWidget->close();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void ExpertManageView::slotAddExpertClicked()
|
|
@@ -125,6 +132,7 @@ void ExpertManageView::slotDetailClicked()
|
|
|
|
|
|
void ExpertManageView::slotDeleteClicked()
|
|
|
{
|
|
|
+ hideExpertInfo();
|
|
|
MessageBox *m = new MessageBox("删除专家信息", "删除后不可恢复,确认删除?", topLevelWidget());
|
|
|
m->exec();
|
|
|
}
|