登录
首页 » C++ » 基于Qt的聊天室

基于Qt的聊天室

于 2022-02-11 发布 文件大小:550.82 kB
0 112
下载积分: 2 下载次数: 1

代码说明:

创建了QTcpSokcet类的实例后,可以用conncetToHost()与服务器进行连接:  QHostAddress *serverIP = new QHostAddress();  QString ip = serverIPLineEdit->text();  serverIP->setAddress(ip);  int port = 8010;  tcpSocket->connectToHost(*serverIP, port);  如果成功,将返回connected()信号,错误则返回error(QAbstrackSocket::SocketError socketError)信号 连接成功后可发送或接收数据:  发送:qunit64 write(const QByteArray &byteArray),发挥实际发送字节数,出错返回-1  接收:readyRead()信号被发送,在槽函数中编写处理数据代码,为避免错误解析数据,可用bytesAvailable()返回缓存中接收到的字节数。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • K_MeansSeg
    KMeans图像聚类分割:用K-Means聚类方法来对图像进行分割。主要是对图像的颜色进行聚类。开发环境:VC6,需要安装OpenCV。(KMeans clustering in image segmentation: with K-Means clustering approach to image segmentation. Mainly the color of the image cluster. Development Environment: VC6, need to install OpenCV.)
    2010-08-08 13:13:32下载
    积分:1
  • DC-motor-control
    两个直流电机双闭环DSP控制程序! 直流单极性双闭环可逆控制程序+直流双极性双闭环可逆控制程序(Two pairs of closed-loop DC motor control procedures DSP! DC unipolar double-loop control procedures reversible+ DC reversible bipolar double-loop control procedures)
    2021-05-07 08:28:36下载
    积分:1
  • TheCPLcn
    序自从1978年《C程序设计语言》出版以来,计算机界经历了一场革命。大型计算机变得更大;而个人计算机的能力可以和十年前的主流计算机相媲美。在这段时间中,C语言也在悄悄地改变,并且早已超出了仅仅作为UNIX操作系统的语言的范畴。(sequence since 1978 "C Programming Language" has been published, the computer industry has undergone a revolution. Large computers become bigger; But the personal computer and the ability to mainstream a decade ago comparable computer. During this period of time, C language is also quietly change, and already in excess of the UNIX operating system only as the language of the area.)
    2006-07-25 16:20:22下载
    积分:1
  • cstr_src
    Yet another CString replacement (Yet another CString replacement)
    2007-10-23 11:27:53下载
    积分:1
  • MFCfeiqu
    实现简单的window局域网通信,即,传输文件。飞秋(Simple window LAN communications, that is, transmission file. Fei Qiu)
    2015-06-15 08:56:44下载
    积分:1
  • zhizhen2
    学习C语言的资料 个人感觉不错 大家看看吧! 呵呵 (Learning C language data we look at it personally feel good! Ha ha)
    2010-08-07 11:15:36下载
    积分:1
  • radar-mainei-tezhengtiqu
    雷达脉冲内调制特征的提取技术,用于雷达特征分析与信号分选。这是matlab程序。(Within the radar pulse modulation feature extraction technique for radar signature analysis and signal separation. This is a matlab program.)
    2013-10-28 18:48:21下载
    积分:1
  • 我所学习过的C++代码大全
    说明:  常用的C++代码,包含C++的基础功能和高级功能,方便查阅。(Commonly used C++ code, including the basic functions and advanced functions of C++ for easy access.)
    2020-06-25 12:40:02下载
    积分:1
  • c#的画图有关代码,别人的基础上做的一点改进,希望对学习I画图的同学有帮助...
    c#的画图有关代码,别人的基础上做的一点改进,希望对学习I画图的同学有帮助-c# the drawing-related code, others do that based on the improvements in the hope of learning I draw the students help
    2022-07-09 13:33:27下载
    积分:1
  • CSharprumenWINFORMstudy
    C#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdfC#入门到精通(WINFORM学习).pdf(C# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdfC# entry to master (WINFORM learning) .pdf)
    2017-03-01 14:27:24下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载