QNetworkSettingsAddressModel Class

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

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

Properties

  • 1 property inherited from QObject

Public Functions

QNetworkSettingsAddressModel(QObject *parent = Q_NULLPTR)
QNetworkSettingsAddressModel(const QStringList &strings, 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()

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Additional Inherited Members

Detailed Description

The QNetworkSettingsAddressModel class represents a network interface address.

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

See also QNetworkSettingsManager.

Property Documentation

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(QObject *parent = Q_NULLPTR)

Creates an address model with the parent parent.

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

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

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.

[signal] void QNetworkSettingsAddressModel::countChanged()

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

Note: Notifier signal for property count.

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.

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.

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