Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

NetworkInformation

Provides a cross-platform interface to network-related information. More...

Import Statement: import QtNetwork
Since: Qt 6.7
In C++: QNetworkInformation

Properties

Detailed Description

NetworkInformation provides a cross-platform interface to network-related information.

NetworkInformation is a singleton.

See also QNetworkInformation.

Property Documentation

isBehindCaptivePortal : bool [read-only]

Indicates if the user's device is currently known to be behind a captive portal.


isMetered : bool [read-only]

Returns whether the current connection is (known to be) metered or not.


reachability : enumeration [read-only]

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 [read-only]

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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded