Qt使用 QProcess来检测 ip 设备是否在线(Ping)
另开一个线程,在子线程中开启一个QProcess进程,设一个定时器每隔一定时间Ping设备的IP地址,若能Ping通,则不做任何处理,若Ping不通,则发送弹窗报警。下面为部分代码:Ping.h#pragma once#include "qobject.h"#include <QNetworkInterface>#include <qdebug.h>#include <qtimer.h>#include <qthread.h>#inc
原创
2022-01-18 19:43:59 ·
7595 阅读 ·
0 评论