资 源 简 介
应用背景基于Qt的局域网聊天系统,实现了局域网聊天,文件传输,更改字体,保存聊天记录等功能,对于研究Qt,研究局域网通信具有较强学习价值。关键技术udpSocket = new QUdpSocket(this);
port = 45454;
udpSocket->bind(port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
connect(udpSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams()));
sendMessage(NewParticipant);
server = new TcpServer(this);
connect(server, SIGNAL(sendFileName(QString)), this, SLOT(getFileName(QString)));
connect(ui->messageTextEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)),
this, SLOT(currentFormatChanged(const QTextCharFormat)));