Skip to content

PythonQt.QtNetwork.QNetworkInterface · declarations 001

Back to PythonQt.QtNetwork.QNetworkInterface

CanBroadcast instance-attribute

CanBroadcast: Any

CanMulticast instance-attribute

CanMulticast: Any

InterfaceFlag instance-attribute

InterfaceFlag: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

InterfaceFlags instance-attribute

InterfaceFlags: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

IsLoopBack instance-attribute

IsLoopBack: Any

IsPointToPoint instance-attribute

IsPointToPoint: Any

IsRunning instance-attribute

IsRunning: Any

IsUp instance-attribute

IsUp: Any

addressEntries

addressEntries() -> tuple

X.addressEntries() -> tuple

Supplemental documentation: Qt 5 reference:

QList\<QNetworkAddressEntry> QNetworkInterface::addressEntries() const

Returns the list of IP addresses that this interface possesses along with their associated netmasks and broadcast addresses.

If the netmask or broadcast address or other information is not necessary, you can call the allAddresses() function to obtain just the IP addresses of the active interfaces.

Upstream PySide2 reference signatures (binding differences may apply):

addressEntries(self) -> typing.List[PySide2.QtNetwork.QNetworkAddressEntry]

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

allAddresses

allAddresses() -> tuple

X.allAddresses() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QList\<QHostAddress> QNetworkInterface::allAddresses()

This convenience function returns all IP addresses found on the host machine. It is equivalent to calling addressEntries() on all the objects returned by allInterfaces() that are in the QNetworkInterface::IsUp state to obtain lists of QNetworkAddressEntry objects then calling QNetworkAddressEntry::ip() on each of these.

Upstream PySide2 reference signatures (binding differences may apply):

allAddresses() -> typing.List[PySide2.QtNetwork.QHostAddress]

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

allInterfaces

allInterfaces() -> tuple

X.allInterfaces() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QList\<QNetworkInterface> QNetworkInterface::allInterfaces()

Returns a listing of all the network interfaces found on the host machine. In case of failure it returns a list with zero elements.

Upstream PySide2 reference signatures (binding differences may apply):

allInterfaces() -> typing.List[PySide2.QtNetwork.QNetworkInterface]

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

flags

flags() -> Any

X.flags()

Supplemental documentation: Qt 5 reference:

QNetworkInterface::InterfaceFlags QNetworkInterface::flags() const

Returns the flags associated with this network interface.

Upstream PySide2 reference signatures (binding differences may apply):

flags(self) -> PySide2.QtNetwork.QNetworkInterface.InterfaceFlags

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

hardwareAddress

hardwareAddress() -> str

X.hardwareAddress() -> str

Supplemental documentation: Qt 5 reference:

QString QNetworkInterface::hardwareAddress() const

Returns the low-level hardware address for this interface. On Ethernet interfaces, this will be a MAC address in string representation, separated by colons.

Other interface types may have other types of hardware addresses. Implementations should not depend on this function returning a valid MAC address.

See also type().

Upstream PySide2 reference signatures (binding differences may apply):

hardwareAddress(self) -> str

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

humanReadableName

humanReadableName() -> str

X.humanReadableName() -> str

Supplemental documentation: Qt 5 reference:

QString QNetworkInterface::humanReadableName() const

Returns the human-readable name of this network interface on Windows, such as "Local Area Connection", if the name could be determined. If it couldn't, this function returns the same as name(). The human-readable name is a name that the user can modify in the Windows Control Panel, so it may change during the execution of the program.

On Unix, this function currently always returns the same as name(), since Unix systems don't store a configuration for human-readable names.

This function was introduced in Qt 4.5.

Upstream PySide2 reference signatures (binding differences may apply):

humanReadableName(self) -> str

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

index

index() -> int

X.index() -> int

Supplemental documentation: Qt 5 reference:

int QNetworkInterface::index() const

Returns the interface system index, if known. This is an integer assigned by the operating system to identify this interface and it generally doesn't change. It matches the scope ID field in IPv6 addresses.

If the index isn't known, this function returns 0.

This function was introduced in Qt 4.5.

Upstream PySide2 reference signatures (binding differences may apply):

index(self) -> int

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

interfaceFromIndex

interfaceFromIndex(index: int) -> Any

X.interfaceFromIndex(index) -> PythonQt.QtNetwork.QNetworkInterface

Supplemental documentation: Qt 5 reference:

[static] QNetworkInterface QNetworkInterface::interfaceFromIndex(int index)

Returns a QNetworkInterface object for the interface whose internal ID is index. Network interfaces have a unique identifier called the "interface index" to distinguish it from other interfaces on the system. Often, this value is assigned progressively and interfaces being removed and then added again get a different value every time.

This index is also found in the IPv6 address' scope ID field.

Upstream PySide2 reference signatures (binding differences may apply):

interfaceFromIndex(index: int) -> PySide2.QtNetwork.QNetworkInterface

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

interfaceFromName

interfaceFromName(name: str) -> Any

X.interfaceFromName(name) -> PythonQt.QtNetwork.QNetworkInterface

Supplemental documentation: Qt 5 reference:

[static] QNetworkInterface QNetworkInterface::interfaceFromName(const QString \&name)

Returns a QNetworkInterface object for the interface named name. If no such interface exists, this function returns an invalid QNetworkInterface object.

The string name may be either an actual interface name (such as "eth0" or "en1") or an interface index in string form ("1", "2", etc.).

See also name() and isValid().

Upstream PySide2 reference signatures (binding differences may apply):

interfaceFromName(name: str) -> PySide2.QtNetwork.QNetworkInterface

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

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QNetworkInterface::isValid() const

Returns true if this QNetworkInterface object contains valid information about a network interface.

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

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

name

name() -> str

X.name() -> str

Supplemental documentation: Qt 5 reference:

QString QNetworkInterface::name() const

Returns the name of this network interface. On Unix systems, this is a string containing the type of the interface and optionally a sequence number, such as "eth0", "lo" or "pcn0". On Windows, it's an internal ID that cannot be changed by the user.

Upstream PySide2 reference signatures (binding differences may apply):

name(self) -> str

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

swap

swap(other: Any) -> None

X.swap(other)

Supplemental documentation: Qt 5 reference:

void QNetworkInterface::swap(QNetworkInterface \&other)

Swaps this network interface instance with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

Upstream PySide2 reference signatures (binding differences may apply):

swap(self, other: PySide2.QtNetwork.QNetworkInterface) -> None

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