QNetworkSettingsAddressModel Class

The QNetworkSettingsAddressModel class represents a network interface address. More...

Header: #include <QNetworkSettingsAddressModel>
qmake: QT += networksettings
Inherits: QStringListModel

Properties

Public Functions

QNetworkSettingsAddressModel(const QStringList &strings, QObject *parent = Q_NULLPTR)
QNetworkSettingsAddressModel(QObject *parent = Q_NULLPTR)
void append(const QString &address)
int count() const
void remove(int index)
void resetChanges()
void setStringList(const QStringList &addresses)

Signals

void countChanged()

Detailed Description

An address model contains a lists of available network interface addresses.

See also QNetworkSettingsManager.

Property Documentation

[read-only] count : const int

Holds the number of rows in the model.

Access functions:

int count() const

Notifier signal:

void countChanged()

Member Function Documentation

QNetworkSettingsAddressModel::QNetworkSettingsAddressModel(const QStringList &strings, QObject *parent = Q_NULLPTR)

Creates an address model with the addresses specified by strings and parent parent.

QNetworkSettingsAddressModel::QNetworkSettingsAddressModel(QObject *parent = Q_NULLPTR)

Creates an address model with the parent parent.

[signal] void QNetworkSettingsAddressModel::countChanged()

This signal is emitted when the number of rows in the model changes.

Note: Notifier signal for property count.

[invokable] void QNetworkSettingsAddressModel::append(const QString &address)

Adds the address specified by address to the address model.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

int QNetworkSettingsAddressModel::count() const

Returns the number of rows in the address model.

Note: Getter function for property count.

[invokable] void QNetworkSettingsAddressModel::remove(int index)

Removes the address at the position specified by index from the address model.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[invokable] void QNetworkSettingsAddressModel::resetChanges()

Resets the changes made to the addresses in the address model.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void QNetworkSettingsAddressModel::setStringList(const QStringList &addresses)

Adds the addresses specified by addresses to the address model.

© 2021 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.