From cf6368f064802e17934dcd7135320bd216558bbc Mon Sep 17 00:00:00 2001 From: RCi <15089880081@163.com> Date: Fri, 14 Nov 2025 00:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/launcher/GUI/paramEditorDialog.h | 1 + .../GUI/uiModule/uiModule_cameraRealTimeCapture.h | 13 +++++++++++++ src/launcher/GUI/uiModule/uiModule_userSwitch.h | 3 --- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/launcher/GUI/paramEditorDialog.h b/src/launcher/GUI/paramEditorDialog.h index 48c70da..7092a95 100644 --- a/src/launcher/GUI/paramEditorDialog.h +++ b/src/launcher/GUI/paramEditorDialog.h @@ -257,6 +257,7 @@ private: QDoubleSpinBox* spinBox = new QDoubleSpinBox(); spinBox->setMaximumWidth(160); spinBox->setDecimals(3);//显示小位数 + spinBox->setRange(-1e6, 1e6); spinBox->setValue(value.toDouble()); spinBox->setToolTip(generateTypeHint(type)); return spinBox; diff --git a/src/launcher/GUI/uiModule/uiModule_cameraRealTimeCapture.h b/src/launcher/GUI/uiModule/uiModule_cameraRealTimeCapture.h index a7d6eb8..f4ccc15 100644 --- a/src/launcher/GUI/uiModule/uiModule_cameraRealTimeCapture.h +++ b/src/launcher/GUI/uiModule/uiModule_cameraRealTimeCapture.h @@ -123,4 +123,17 @@ public: #pragma endregion } +protected: + void closeEvent(QCloseEvent* event) override { + // 安全停止取流线程 + if (_GrabbingThread && _GrabbingThread->isRunning()) { + _GrabbingThread->stop(); + _GrabbingThread->wait(500); // 给线程一点时间退出 + } + // 复位按钮文本(如果按钮仍存在) + if (auto btn = this->findChild("btn_startGrabbing")) { + btn->setText("开始取流"); + } + QWidget::closeEvent(event); + } }; \ No newline at end of file diff --git a/src/launcher/GUI/uiModule/uiModule_userSwitch.h b/src/launcher/GUI/uiModule/uiModule_userSwitch.h index 629d164..7db6208 100644 --- a/src/launcher/GUI/uiModule/uiModule_userSwitch.h +++ b/src/launcher/GUI/uiModule/uiModule_userSwitch.h @@ -70,9 +70,6 @@ private slots: stopAutoLogout(); - QMessageBox::information(nullptr, TR("Auto Logout"), - TR("Login time exceeded 3 minutes, auto logout")); - emit userLoggedOut(); }