备份
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<QPushButton*>("btn_startGrabbing")) {
|
||||
btn->setText("开始取流");
|
||||
}
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
};
|
||||
@@ -70,9 +70,6 @@ private slots:
|
||||
|
||||
stopAutoLogout();
|
||||
|
||||
QMessageBox::information(nullptr, TR("Auto Logout"),
|
||||
TR("Login time exceeded 3 minutes, auto logout"));
|
||||
|
||||
emit userLoggedOut();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user