Ai
1 Star 0 Fork 3

Jimin111/多功能上位机软件

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tcpclientsocket.cpp 615 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jimin111 提交于 2023-01-26 20:44 +08:00 . my commit
#include "tcpclientsocket.h"
TcpClientSocket::TcpClientSocket(QObject *parent) : QTcpSocket(parent)
{
//客户端有消息传进来时会触发信号readyRead
connect(this,SIGNAL(readyRead()),this,SLOT(slotReceiveDate()));
//客户端断开连接时会触发信号disconnected
connect(this,SIGNAL(disconnected()),this,SLOT(slotClientDisconnected()));
}
void TcpClientSocket::slotReceiveDate()
{
QByteArray baArray=readAll();
QString sMsg=baArray;
emit sigUpdateSever(sMsg);
}
void TcpClientSocket::slotClientDisconnected()
{
emit sigClientDisconnect(this->socketDescriptor());
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/jimin111/Multi-function-upper-computer-software.git
git@gitee.com:jimin111/Multi-function-upper-computer-software.git
jimin111
Multi-function-upper-computer-software
多功能上位机软件
master

搜索帮助