How to show WiFi connections?
-
Hi,
How can I access the connections connected to my computer? I want to show them in QML and select one to connect to the internet. Does Qt have a library for this?
-
@jsulm I finally use a this code. Program in Windows and Raspberry PI do not show any things but in Ubuntu work!
http://www.mediafire.com/file/7jrm90s1vsrs5m2/WiFi.rar/file -
You'll use the QNetworkInterface class to obtain a list of your network interfaces. Then iterate through the list, looking for those entries with QNetworkInterface::Wifi.
Depending on your specific hardware, this may not work absolutely 100% of the time, but I found it pretty reliable for my applications.
EDIT: this is of course a C++ solution, but it should be straightforward to expose them to QML.
-
@Saeed_Nowroozi said in How to show WiFi connections?:
I want to use in Raspberry Pi
Do so. Works same way there.
-
@jsulm I finally use a this code. Program in Windows and Raspberry PI do not show any things but in Ubuntu work!
http://www.mediafire.com/file/7jrm90s1vsrs5m2/WiFi.rar/file