Question

I need to find available network connections like eth,wlan,bluetooth. Does Qt emit any signals on detection of these access-points automatically? And also if more than 1 connection is available how would I know that which access point is used by system? And also if only 1 connection[apart form eth0] is present, for ex:WLAN Do we need to apply any additional settings for using ftp/htttp protocols?

Thanx

Was it helpful?

Solution

I think what you are looking for is QNetworkConfigurationManager which was added in Qt 4.7.

QNetworkConfigurationManager provides access to the network configurations known to the system and enables applications to detect the system capabilities (with regards to network sessions) at runtime.

It has signals for configurations being added and removed.

It can also trigger a scan with the updateConfigurations() slot (a signal will be emitted when complete):

Initiates an update of all configurations. This may be used to initiate WLAN scans or other time consuming updates which may be required to obtain the correct state for configurations.

You can set the connection a QNetworkAccessManager uses by calling QNetworkAccessManager::setConfiguration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top