如何获得WiFi信号强度使用Qt? [英] How to get wifi signal strength using Qt?

查看:1045
本文介绍了如何获得WiFi信号强度使用Qt?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我可以使用QNetworkConfigurationManager :: allConfigurations()扫描所有可用的WiFi,但每个的QNetworkConfiguration数据没有wifi信号强度。你能指点我如何获得这些数据吗?谢谢!

So far I am able to scan all the available wifi using QNetworkConfigurationManager::allConfigurations(), but the QNetworkConfiguration data for each of them does not have the wifi signal strength. Can you point me into how to get this data? Thanks!

推荐答案

您可以使用QProcess并运行命令行命令扫描WiFi网络。

You could use QProcess and run command line commands to scan for wifi networks. Use regular expressions to parse the command line output which contains all details of the wifi network.

如果您使用的是linux,则命令为iwlist scan

If you are using linux then the command is "iwlist scan"

这篇关于如何获得WiFi信号强度使用Qt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆