Skip to content

PythonQt.Qt.QHostAddress

QHostAddress

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

This class holds an IPv4 or IPv6 address in a platform- and protocol-independent manner.

QHostAddress is normally used with the QTcpSocket, QTcpServer, and QUdpSocket to connect to a host or to set up a server.

A host address is set with setAddress(), and retrieved with toIPv4Address(), toIPv6Address(), or toString(). You can check the type with protocol().

Note: Please note that QHostAddress does not do DNS lookups. QHostInfo is needed for that.

The class also supports common predefined addresses: Null, LocalHost, LocalHostIPv6, Broadcast, and Any.

Source: https://doc.qt.io/archives/qt-5.15/qhostaddress.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
Any attribute Any (shared captured text)
AnyIPv4 attribute Any (shared captured text)
AnyIPv6 attribute Any (shared captured text)
Broadcast attribute Any (shared captured text)
LocalHost attribute Any (shared captured text)
LocalHostIPv6 attribute Any (shared captured text)
Null attribute Any (shared captured text)
SpecialAddress attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
clear function (self) -> None Sets the host address to null and sets the protocol to [QAbstractSocket::UnknownNetworkLayerProtocol](https://doc.qt.io/archives/qt-5.15/qabstractsocket.html#NetworkLayerProtocol-enum). (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
isInSubnet function (self, subnet: Any, netmask: Any) -> bool X.isInSubnet(subnet, netmask) -> bool (shared captured text)
isLoopback function (self) -> bool X.isLoopback() -> bool (shared captured text)
isMulticast function (self) -> bool X.isMulticast() -> bool (shared captured text)
isNull function (self) -> bool X.isNull() -> bool (shared captured text)
parseSubnet function (self, subnet: str) -> Any Parses the IP and subnet information contained in subnet and returns the network prefix for that network and its prefix length. (shared captured text)
protocol function (self) -> Any Returns the network layer protocol of the host address. (shared captured text)
readFrom function (self, arg__1: Any) -> Any (shared captured text)
scopeId function (self) -> str X.scopeId() -> str (shared captured text)
setAddress function (self, ip6Addr: Any) -> Any Set the IPv4 address specified by ip4Addr. (shared captured text)
setScopeId function (self, id: str) -> None Sets the IPv6 scope ID of the address to id. (shared captured text)
swap function (self, other: Any) -> None Swaps this host address with other. (shared captured text)
toIPv4Address function (self, ok: Any) -> int X.toIPv4Address(ok) -> int (shared captured text)
toIPv6Address function (self) -> Any X.toIPv6Address() -> PythonQt.QtNetwork.QIPv6Address (shared captured text)
toString function (self) -> str X.toString() -> str (shared captured text)
writeTo function (self, arg__1: Any) -> Any (shared captured text)