- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes

# QHostAddress Class Reference

Search for all occurrences

## Detailed Description

Definition at line 70 of file qhostaddress.h.

`#include <qhostaddress.h>`

List of all members.

## Public Types
enum | SpecialAddress { Null, Broadcast, LocalHost, LocalHostIPv6, Any, AnyIPv6 }
## Public Member Functions
| QHostAddress ()
| QHostAddress (quint32 ip4Addr)
| QHostAddress (quint8 *ip6Addr)
| QHostAddress (const Q_IPV6ADDR &ip6Addr)
| QHostAddress (const sockaddr *sockaddr)
| QHostAddress (const QString &address)
| QHostAddress (const QHostAddress &copy)
| QHostAddress (SpecialAddress address)
| ~QHostAddress ()
QHostAddress & | operator= (const QHostAddress &other)
QHostAddress & | operator= (const QString &address)
void | setAddress (quint32 ip4Addr)
void | setAddress (quint8 *ip6Addr)
void | setAddress (const Q_IPV6ADDR &ip6Addr)
void | setAddress (const sockaddr *sockaddr)
bool | setAddress (const QString &address)
QAbstractSocket::NetworkLayerProtocol | protocol () const
quint32 | toIPv4Address () const
Q_IPV6ADDR | toIPv6Address () const
QString | toString () const
QString | scopeId () const
void | setScopeId (const QString &id)
bool | operator== (const QHostAddress &address) const
bool | operator== (SpecialAddress address) const
bool | operator!= (const QHostAddress &address) const
bool | operator!= (SpecialAddress address) const
bool | isNull () const
void | clear ()
bool | isInSubnet (const QHostAddress &subnet, int netmask) const
bool | isInSubnet (const QPair< QHostAddress, int > &subnet) const
## Static Public Member Functions
static QPair< QHostAddress, int > | parseSubnet (const QString &subnet)
## Protected Attributes
QScopedPointer < QHostAddressPrivate > | d

## Member Enumeration Documentation

enum SpecialAddress

Search for all occurrences

Enumerator:

  Null | Search for all occurrences
  Broadcast | Search for all occurrences
  LocalHost | Search for all occurrences
  LocalHostIPv6 | Search for all occurrences
  Any | Search for all occurrences
  AnyIPv6 | Search for all occurrences

Definition at line 73 of file qhostaddress.h.

                            {
            Null,
            Broadcast,
            LocalHost,
            LocalHostIPv6,
            Any,
            AnyIPv6
        };

## Constructor & Destructor Documentation

QHostAddress | ( |  | ) |

QHostAddress | ( | quint32 | ip4Addr | ) | `[explicit]`

QHostAddress | ( | quint8 * | ip6Addr | ) | `[explicit]`

QHostAddress | ( | const Q_IPV6ADDR & | ip6Addr | ) | `[explicit]`

QHostAddress | ( | const sockaddr * | sockaddr | ) | `[explicit]`

QHostAddress | ( | const QString & | address | ) | `[explicit]`

QHostAddress | ( | const QHostAddress & | copy | ) |

QHostAddress | ( | SpecialAddress | address | ) |

~QHostAddress | ( |  | ) |

## Member Function Documentation

QHostAddress& operator= | ( | const QHostAddress & | other | ) |

QHostAddress& operator= | ( | const QString & | address | ) |

void setAddress | ( | quint32 | ip4Addr | ) |

Search for all occurrences

void setAddress | ( | quint8 * | ip6Addr | ) |

Search for all occurrences

void setAddress | ( | const Q_IPV6ADDR & | ip6Addr | ) |

Search for all occurrences

void setAddress | ( | const sockaddr * | sockaddr | ) |

Search for all occurrences

bool setAddress | ( | const QString & | address | ) |

Search for all occurrences

QAbstractSocket::NetworkLayerProtocol protocol | ( |  | ) | const

Search for all occurrences

quint32 toIPv4Address | ( |  | ) | const

Search for all occurrences

Q_IPV6ADDR toIPv6Address | ( |  | ) | const

Search for all occurrences

QString toString | ( |  | ) | const

Search for all occurrences

QString scopeId | ( |  | ) | const

Search for all occurrences

void setScopeId | ( | const QString & | id | ) |

Search for all occurrences

bool operator== | ( | const QHostAddress & | address | ) | const

bool operator== | ( | SpecialAddress | address | ) | const

bool operator!= | ( | const QHostAddress & | address | ) | const `[inline]`

Definition at line 112 of file qhostaddress.h.

        { return !operator==(address); }

bool operator!= | ( | SpecialAddress | address | ) | const `[inline]`

Definition at line 114 of file qhostaddress.h.

        { return !operator==(address); }

bool isNull | ( |  | ) | const

Search for all occurrences

void clear | ( |  | ) |

Search for all occurrences

bool isInSubnet | ( | const QHostAddress & | subnet,
|  | int | netmask
| ) |  | const

Search for all occurrences

bool isInSubnet | ( | const QPair< QHostAddress, int > & | subnet | ) | const

Search for all occurrences

static QPair<QHostAddress, int> parseSubnet | ( | const QString & | subnet | ) | `[static]`

Search for all occurrences

## Member Data Documentation

QScopedPointer<QHostAddressPrivate> d `[protected]`

Search for all occurrences

Definition at line 134 of file qhostaddress.h.

The documentation for this class was generated from the following file:

- QtNetwork/qhostaddress.h

QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress
QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress QHostAddress