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