<?xml version="1.0" encoding="US-ASCII"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>SampleWPA2PSK</name>
<SSIDConfig>
<SSID>
<name>SampleWPA2PSK</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<autoSwitch>false</autoSwitch>
<MSM>
<security>
<authEncryption>
<authentication>WPA2PSK</authentication>
<encryption>AES</encryption>
<useOneX>false</useOneX>
</authEncryption>
<sharedKey><keyType>passPhrase</keyType><protected>false</protected><keyMaterial> <!-- insert key here --> </keyMaterial></sharedKey>
</security>
</MSM></WLANProfile>
【加密类型设置】
<encryption>AES</encryption>
【安全类型设置】
<authentication>WPAPSK</authentication>
具体功能编程实现(QTCtreator 5.xx)
Value Description open Open 802.11 authentication. shared Shared 802.11 authentication. WPA WPA-Enterprise 802.11 authentication. WPAPSK WPA-Personal 802.11 authentication. WPA2 WPA2-Enterprise 802.11 authentication. WPA2PSK WPA2-Personal 802.11 authentication.
LIBS+=$$quote(E:/qt/2015-4-9/WlanGetProfileTest/WlanGetProfileTest/lib/wlanapi.lib)
LIBS+=$$quote(E:/qt/2015-4-9/WlanGetProfileTest/WlanGetProfileTest/lib/OLE32.lib)
包含头文件
#include<windows.h>
#include<wlanapi.h>
http://blog.csdn.net/freeape/article/details/45954309
QT---Native Wifi functions 应用(WiFi有密码连接)
原文:http://www.cnblogs.com/findumars/p/6294156.html