![loopback ipv6 loopback ipv6](https://i.stack.imgur.com/O9V4S.png)
QHostAddress:: QHostAddress()Ĭonstructs a null host address object, i.e. QHostAddress:: QHostAddress( quint32 ip4Addr)Ĭonstructs a host address object with the IPv4 address ip4Addr. Ip6Addr must be a 16-byte array in network byte order (big endian). QHostAddress:: QHostAddress( quint8 * ip6Addr) QHostAddress:: QHostAddress(const quint8 * ip6Addr)Ĭonstructs a host address object with the IPv6 address ip6Addr. QHostAddress:: QHostAddress(const Q_IPV6ADDR & ip6Addr)Ĭonstructs a host address object with the IPv6 address ip6Addr. QHostAddress:: QHostAddress(const sockaddr * sockaddr)Ĭonstructs an IPv4 or IPv6 address using the address specified by the native structure sockaddr. QHostAddress:: QHostAddress(const QString & address)Ĭonstructs an IPv4 or IPv6 address based on the string address (e.g., "127.0.0.1"). QHostAddress:: QHostAddress(const QHostAddress & address)Ĭonstructs a copy of the given address. Member Function Documentation QHostAddress:: QHostAddress( QHostAddress::SpecialAddress address)Ĭonstructs a QHostAddress object for address. It stores an OR combination of ConversionModeFlag values. The ConversionMode type is a typedef for QFlags. This enum was introduced or modified in Qt 5.8. QHostAddress("::1") will compare equal to QHostAddress("127.0.0.1").Īll unspecified addresses will compare equal, namely AnyIPv4, AnyIPv6 and Any. Therefore QHostAddress("::192.168.1.1") will compare equal to QHostAddress("192.168.1.1").Ĭonvert the IPv6 loopback addresses to its IPv4 equivalent when comparing. Therefore QHostAddress("::ffff:192.168.1.1") will compare equal to QHostAddress("192.168.1.1").Ĭonvert IPv4-compatible IPv6 addresses (RFC 4291 sect. Operator=(QHostAddress::SpecialAddress other) constĭon't convert IPv6 addresses to IPv4 when comparing two QHostAddress objects of different protocols, so they will always be considered different.Ĭonvert IPv4-mapped IPv6 addresses (RFC 4291 sect. Operator=(const QHostAddress & other) const Operator=(QHostAddress::SpecialAddress address) Operator!=(QHostAddress::SpecialAddress other) const Operator!=(const QHostAddress & other) const SetAddress(QHostAddress::SpecialAddress address)
![loopback ipv6 loopback ipv6](https://i.ytimg.com/vi/rtzPUPYArAY/hqdefault.jpg)
IsInSubnet(const QHostAddress & subnet, int netmask) const IsEqual(const QHostAddress & other, QHostAddress::ConversionMode mode = TolerantConversion) const QHostAddress(const QHostAddress & address) QHostAddress(QHostAddress::SpecialAddress address)