From a6a4b26e2695b84f8846c22d4c3b32dad36bd77f Mon Sep 17 00:00:00 2001 From: zhangsan Date: Thu, 21 Oct 2021 18:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=90=AF=E5=8A=A8=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=88=B0=E5=8F=AF=E6=89=A7=E8=A1=8C=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=89=80=E5=9C=A8=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 88eed3c..64ae1ad 100644 --- a/main.cpp +++ b/main.cpp @@ -10,6 +10,9 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); + //切换当前工作目录 + QDir::setCurrent(QCoreApplication::applicationDirPath()); + //初始化配置文件 MainConfig::initConfig(); @@ -29,19 +32,19 @@ int main(int argc, char *argv[]) //绑定信号与槽 QObject::connect(&websocketService,&WebsocketService::wsConnectedStatusChanged, - &w,&MainWidget::onWsConnectedStatusChanged); + &w,&MainWidget::onWsConnectedStatusChanged); QObject::connect(&websocketService,&WebsocketService::newPatientMergencyInfo, - &w,&MainWidget::onNewPatientMergencyInfo); + &w,&MainWidget::onNewPatientMergencyInfo); QObject::connect(&websocketService,&WebsocketService::patientMergencyStatusChanged, - &w,&MainWidget::onPatientMergencyStatusChanged); + &w,&MainWidget::onPatientMergencyStatusChanged); QObject::connect(&deviceService,&DeviceService::keyClicked, - &w,&MainWidget::onKeyClicked); + &w,&MainWidget::onKeyClicked); QObject::connect(&w,&MainWidget::statusChanged,&httpService,&HttpService::updateStatus); QObject::connect(&w,&MainWidget::complexOneKeyStart,&httpService,&HttpService::onComplexOneKeyStart); w.show(); -// w.showFullScreen(); + // w.showFullScreen(); return a.exec(); }