feat: 增加数据回复功能

This commit is contained in:
chenyf 2024-09-09 09:54:17 +08:00
parent c1fe2597f1
commit b62a34e1cb
1 changed files with 6 additions and 0 deletions

View File

@ -61,4 +61,10 @@ void MainWindow::read_data()
QByteArray data = socket->readAll(); QByteArray data = socket->readAll();
QString str = data.data(); QString str = data.data();
ui->pte_info->append(str); ui->pte_info->append(str);
str = "收到数据:" + str;
// std::cout << str.toStdString() << std::endl;
QByteArray data1 = str.toUtf8();
socket->write(data1);
} }