QNetworkInformation

QNetworkInformation exposes various network information through native backends. More

Inheritance diagram of PySide6.QtNetwork.QNetworkInformation

Synopsis

Functions

Static functions

Detailed Description

QNetworkInformation provides a cross-platform interface to network-related information through plugins.

Various plugins can have various functionality supported, and so you can load() plugins based on which features are needed.

QNetworkInformation is a singleton and stays alive from the first successful load() until destruction of the QCoreApplication object. If you destroy and re-create the QCoreApplication object you must call load() again.

See also

Feature

class PySide6.QtNetwork.QNetworkInformation
PySide6.QtNetwork.QNetworkInformation.Reachability

Constant

Description

QNetworkInformation.Reachability.Unknown

If this value is returned then we may be connected but the OS has still not confirmed full connectivity, or this features is not supported.

QNetworkInformation.Reachability.Disconnected

Indicates that the system may have no connectivity at all.

QNetworkInformation.Reachability.Local

Indicates that the system is connected to a network, but it might only be able to access devices on the local network.

QNetworkInformation.Reachability.Site

Indicates that the system is connected to a network, but it might only be able to access devices on the local subnet or an intranet.

QNetworkInformation.Reachability.Online

Indicates that the system is connected to a network and able to access the Internet.

See also

reachability

PySide6.QtNetwork.QNetworkInformation.Feature

Lists all of the features that a plugin may currently support. This can be used in load() .

Constant

Description

QNetworkInformation.Feature.Reachability

If the plugin supports this feature then the reachability property will be available. See also Reachability .

static PySide6.QtNetwork.QNetworkInformation.availableBackends()
Return type

list of strings

Returns a list of the names of all currently available backends.

PySide6.QtNetwork.QNetworkInformation.backendName()
Return type

str

Returns the name of the currently loaded backend.

static PySide6.QtNetwork.QNetworkInformation.instance()
Return type

PySide6.QtNetwork.QNetworkInformation

Returns a pointer to the instance of the QNetworkInformation , if any.

See also

load()

static PySide6.QtNetwork.QNetworkInformation.load(features)
Parameters

featuresFeatures

Return type

bool

Load a backend which supports features.

Returns true if it managed to load the requested backend or if it was already loaded. Returns false otherwise

See also

instance

static PySide6.QtNetwork.QNetworkInformation.load(backend)
Parameters

backendQStringView

Return type

bool

Attempts to load a backend whose name matches backend (case insensitively).

Returns true if it managed to load the requested backend or if it was already loaded. Returns false otherwise

See also

instance

PySide6.QtNetwork.QNetworkInformation.reachability()
Return type

Reachability

PySide6.QtNetwork.QNetworkInformation.reachabilityChanged(newReachability)
Parameters

newReachabilityReachability

PySide6.QtNetwork.QNetworkInformation.supports(features)
Parameters

featuresFeatures

Return type

bool

Returns true if the currently loaded backend supports features.