![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
qt
虚幻交界
这个作者很懒,什么都没留下…
展开
-
Qt计时器
Qt 时钟主要使用QTimer和QTime类QTimer类初始化QTimer对象QTimer *timer = new QTimer;开始计时// void start(std::chrono::milliseconds msec)timer->start(1000);// 每隔 1000 毫秒发射一个timeout信号关联timeout信号connect(timer, &QTimer::timeout, this, &timerDemo::timeout_slo原创 2022-05-31 11:53:21 · 626 阅读 · 1 评论 -
Qt udp编程
初始化udpSocketQUdpSocket * udpSocket = new QUdpSocket(this);绑定本地端口quint64 port = ui->localPort->text().toUInt();udpSocket->bind(port);关联readyRead信号connect(udpSocket, &QUdpSocket::readyRead, this, &UdpDemo::readyRead_slot);实现readyRe原创 2022-05-31 09:42:45 · 622 阅读 · 0 评论 -
Qt 网络编程制作一个客户端与服务器
tcp服务器使用 QtcpServer 与 QtcpSocket 类使用QtcpServer、QtcpSocket类之前在项目的.pro文件中添加 Qt += network步骤初始化一个QTcpServer 对象,注意初始化时传入一个this指针QTcpServer *tcpServer = new QTcpServer(this);关联newConnection信号,开启监听后,当一个新的连接接入,会发射newConnection信号,并使用关联的newConnection_slo原创 2022-05-25 16:35:53 · 1321 阅读 · 0 评论