From b62a34e1cbc4a91dbb67593fb90fe80eb9763113 Mon Sep 17 00:00:00 2001 From: chenyf <1343619937@qq.com> Date: Mon, 9 Sep 2024 09:54:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 7c477c6..40e88b0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -61,4 +61,10 @@ void MainWindow::read_data() QByteArray data = socket->readAll(); QString str = data.data(); ui->pte_info->append(str); + str = "收到数据:" + str; + // std::cout << str.toStdString() << std::endl; + QByteArray data1 = str.toUtf8(); + socket->write(data1); + + } \ No newline at end of file