QNetworkSettingsIPv4 Class

The QNetworkSettingsIPv4 class encapsulates IPv4 network configuration. More...

Header: #include <QNetworkSettingsIPv4>
qmake: QT += networksettings
Inherits: QObject

Public Types

enum MethodType { Dhcp, Manual, Off }

Properties

Public Functions

QNetworkSettingsIPv4(QObject *parent = Q_NULLPTR)
QString address() const
QString gateway() const
QString mask() const
QNetworkSettingsIPv4::MethodType method() const
void setAddress(const QString &address)
void setGateway(const QString &gateway)
void setMask(const QString &mask)
void setMethod(const QNetworkSettingsIPv4::MethodType method)

Signals

Detailed Description

Member Type Documentation

enum QNetworkSettingsIPv4::MethodType

This enum type holds the method used for IPv4 configuration.

ConstantValueDescription
QNetworkSettingsIPv4::Dhcp0The DHCP protocol is used for the network configuration.
QNetworkSettingsIPv4::Manual1The network is configured manually.
QNetworkSettingsIPv4::Off2The network is not configured.

Property Documentation

address : QString

Holds the IPv4 address.

Access functions:

QString address() const
void setAddress(const QString &address)

Notifier signal:

void addressChanged()

gateway : QString

Holds the IPv4 gateway address.

Access functions:

QString gateway() const
void setGateway(const QString &gateway)

Notifier signal:

void gatewayChanged()

mask : QString

Holds the IPv4 network mask.

Access functions:

QString mask() const
void setMask(const QString &mask)

Notifier signal:

void maskChanged()

method : MethodType

Holds the method of IPv4 configuration.

Access functions:

QNetworkSettingsIPv4::MethodType method() const
void setMethod(const QNetworkSettingsIPv4::MethodType method)

Notifier signal:

void methodChanged()

See also QNetworkSettingsIPv4::MethodType.

Member Function Documentation

QNetworkSettingsIPv4::QNetworkSettingsIPv4(QObject *parent = Q_NULLPTR)

Creates a new IPv4 network configuration with the parent parent.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.