Network selection popup
-
hello
i want 2 ask how i could give user choice 2 connect 2 network through popup of available connection? -
i tried this
@
QNetworkConfigurationManager manager;
const bool selectIap = (manager.capabilities()& QNetworkConfigurationManager::CanStartAndStopInterfaces);
QNetworkConfiguration defaultIap = manager.defaultConfiguration();
if(!defaultIap.isValid() || !selectIap )
{
// let the user know that there is no access point available
QMessageBox::information(this,"Bearer","Available Access Points not found");
return;
}QNetworkSession *session = new QNetworkSession(defaultIap,this);
session->open();
session->waitForOpened();
QNetworkInterface iff = session->interface();
QMessageBox::information(this,"Network opened",iff.humanReadableName());@
put when i close ethernet connection to test this on simulator i got MessageBox "Available Access Points not found"
i want 2 give me popup 2 connect 2 internet what can i do?