Provides a cross-platform interface to network-related information. More...
| Import Statement: | import QtNetwork |
| Since: | Qt 6.7 |
| In C++: | QNetworkInformation |
NetworkInformation provides a cross-platform interface to network-related information.
NetworkInformation is a singleton.
See also QNetworkInformation.
|
isBehindCaptivePortal : bool |
Indicates if the user's device is currently known to be behind a captive portal.
|
isMetered : bool |
Returns whether the current connection is (known to be) metered or not.
|
reachability : enumeration |
Holds the current state of the system's network connectivity.
| Constant | Description |
|---|---|
NetworkInformation.Reachability.Unknown |
Connection may be established but the OS has yet to confirm full connectivity, or this feature is not supported. |
NetworkInformation.Reachability.Disconnected |
The system may not have connectivity at all. |
NetworkInformation.Reachability.Local |
The system is connected to a network, but might only be able to access devices on the local network. |
NetworkInformation.Reachability.Site |
The system is connected to a network, but might only be able to access devices on the local subnet or an intranet. |
NetworkInformation.Reachability.Online |
The system is connected to a network and able to access the Internet. |
|
transportMedium : enumeration |
Holds the currently active transport medium for the application.
| Constant | Description |
|---|---|
NetworkInformation.TransportMedium.Unknown |
If the OS reports no active medium, the active medium is not recognized by Qt, or the TransportMedium feature is not supported. |
NetworkInformation.TransportMedium.Ethernet |
The currently active connection is using Ethernet. Note: This value may also be returned when Windows is connected to a Bluetooth personal area network. |
NetworkInformation.TransportMedium.Cellular |
The currently active connection is using a cellular network. |
NetworkInformation.TransportMedium.WiFi |
The currently active connection is using Wi-Fi. |
NetworkInformation.TransportMedium.Bluetooth |
The currently active connection is connected using Bluetooth. |
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: