Skip to content

PythonQt.QtNetwork.QNetworkInterface

QNetworkInterface

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

QNetworkInterface represents one network interface attached to the host where the program is being run. Each network interface may contain zero or more IP addresses, each of which is optionally associated with a netmask and/or a broadcast address. The list of such trios can be obtained with addressEntries(). Alternatively, when the netmask or the broadcast addresses or other information aren't necessary, use the allAddresses() convenience function to obtain just the IP addresses of the active interfaces.

QNetworkInterface also reports the interface's hardware address with hardwareAddress().

Not all operating systems support reporting all features. Only the IPv4 addresses are guaranteed to be listed by this class in all platforms. In particular, IPv6 address listing is only supported on Windows, Linux, macOS and the BSDs.

Source: https://doc.qt.io/archives/qt-5.15/qnetworkinterface.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
CanBroadcast attribute Any
CanMulticast attribute Any
InterfaceFlag attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
InterfaceFlags attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
IsLoopBack attribute Any
IsPointToPoint attribute Any
IsRunning attribute Any
IsUp attribute Any
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
addressEntries function (self) -> tuple X.addressEntries() -> tuple
allAddresses function (self) -> tuple X.allAddresses() -> tuple
allInterfaces function (self) -> tuple X.allInterfaces() -> tuple
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
flags function (self) -> Any Returns the flags associated with this network interface.
hardwareAddress function (self) -> str X.hardwareAddress() -> str
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
humanReadableName function (self) -> str X.humanReadableName() -> str
index function (self) -> int X.index() -> int
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
interfaceFromIndex function (self, index: int) -> Any X.interfaceFromIndex(index) -> PythonQt.QtNetwork.QNetworkInterface
interfaceFromName function (self, name: str) -> Any X.interfaceFromName(name) -> PythonQt.QtNetwork.QNetworkInterface
isValid function (self) -> bool X.isValid() -> bool
name function (self) -> str X.name() -> str
swap function (self, other: Any) -> None Swaps this network interface instance with other.