From 168b3c5af99ba99b062c3b010cadf24d99dcff3c Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Wed, 5 Mar 2025 09:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 3a97355..468b0ae 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -17,7 +17,7 @@ #include #include #include "relaysetting.h" - +#include "common.h" QString g_strServerIp; MainWindow::MainWindow(QWidget *parent) @@ -57,6 +57,12 @@ MainWindow::MainWindow(QWidget *parent) QSettings settingsread(QCoreApplication::applicationDirPath() + "\\config\\config.ini",QSettings::IniFormat); g_strServerIp = settingsread.value("Server/IP").toString(); + + // 设置自定义日志处理函数 +#ifndef QT_DEBUG + qInstallMessageHandler(messageHandler); +#endif + } MainWindow::~MainWindow()