feat: 增加数据回复功能
This commit is contained in:
parent
c1fe2597f1
commit
b62a34e1cb
|
@ -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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue