设定子窗口为模态

This commit is contained in:
JackLee_CN 2024-12-10 14:48:53 +08:00
parent 9e987b6ffb
commit 0593339746
3 changed files with 6 additions and 3 deletions

View File

@ -44,7 +44,6 @@ void sui::paintEvent(QPaintEvent *event)
painter.drawRoundedRect(this->rect(), 10, 10); painter.drawRoundedRect(this->rect(), 10, 10);
QWidget::paintEvent(event); QWidget::paintEvent(event);
} }
void sui::region(const QPoint &currentGlobalPoint) void sui::region(const QPoint &currentGlobalPoint)
{ {
// 获取窗体在屏幕上的位置区域topLeft为坐上角点rightButton为右下角点 // 获取窗体在屏幕上的位置区域topLeft为坐上角点rightButton为右下角点

View File

@ -30,7 +30,6 @@ private:
bool m_press; bool m_press;
int m_border_width; int m_border_width;
Orient ori; Orient ori;
sui_title *m_title; sui_title *m_title;
protected: protected:
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event);

View File

@ -498,6 +498,7 @@ void xsteam_ui::slots_push_manifest()
{ {
xs_push_manifest->setMaximumSize(width(), height() - 30); xs_push_manifest->setMaximumSize(width(), height() - 30);
xs_push_manifest->setGeometry(geometry()); xs_push_manifest->setGeometry(geometry());
xs_push_manifest->setWindowModality(Qt::ApplicationModal);
xs_push_manifest->show(); xs_push_manifest->show();
} }
} }
@ -509,6 +510,7 @@ void xsteam_ui::slots_open_server_edit()
xs_src_edit_ui->setMaximumSize(width(), height()- 30); xs_src_edit_ui->setMaximumSize(width(), height()- 30);
xs_src_edit_ui->setGeometry(geometry()); xs_src_edit_ui->setGeometry(geometry());
connect(xs_src_edit_ui, SIGNAL(signals_update()), this, SLOT(slots_server_combobox_load_data())); connect(xs_src_edit_ui, SIGNAL(signals_update()), this, SLOT(slots_server_combobox_load_data()));
xs_src_edit_ui->setWindowModality(Qt::ApplicationModal);
xs_src_edit_ui->show(); xs_src_edit_ui->show();
} }
} }
@ -519,6 +521,7 @@ void xsteam_ui::slots_open_update()
{ {
xs_update_ui->setMaximumSize(width() / 2, height()); xs_update_ui->setMaximumSize(width() / 2, height());
xs_update_ui->setGeometry(geometry()); xs_update_ui->setGeometry(geometry());
xs_update_ui->setWindowModality(Qt::ApplicationModal);
xs_update_ui->show(); xs_update_ui->show();
} }
} }
@ -529,6 +532,7 @@ void xsteam_ui::slots_open_setting()
{ {
xs_sets_ui->setMaximumSize(width(), height()- 30); xs_sets_ui->setMaximumSize(width(), height()- 30);
xs_sets_ui->setGeometry(geometry()); xs_sets_ui->setGeometry(geometry());
xs_sets_ui->setWindowModality(Qt::ApplicationModal);
xs_sets_ui->show(); xs_sets_ui->show();
} }
} }
@ -539,6 +543,7 @@ void xsteam_ui::slots_open_about()
{ {
xs_about_ui->setMaximumSize(width() / 2, height()); xs_about_ui->setMaximumSize(width() / 2, height());
xs_about_ui->setGeometry(geometry()); xs_about_ui->setGeometry(geometry());
xs_about_ui->setWindowModality(Qt::ApplicationModal);
xs_about_ui->show(); xs_about_ui->show();
} }
} }