QNetworkSettingsInterface Class

Represents a network interface. More...

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


  • name : const QString
  • powered : bool
  • state : const QNetworkSettingsState::States
  • type : const QNetworkSettingsType::Types
  • 1 property inherited from QObject

Public Functions

QNetworkSettingsInterface(QObject *parent = Q_NULLPTR)
QString name() const
bool powered() const
void scanServices()
void setPowered(const bool powered)
QNetworkSettingsState::States state()
QNetworkSettingsType::Types type()
  • 31 public functions inherited from QObject


void nameChanged()
void poweredChanged()
void stateChanged()
void typeChanged()

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Protected Functions

QNetworkSettingsInterface(const QNetworkSettingsInterface &)
QNetworkSettingsInterface &operator=(const QNetworkSettingsInterface &)
  • 9 protected functions inherited from QObject

Protected Variables

QNetworkSettingsInterfacePrivate *d_ptr

Additional Inherited Members

  • 1 public slot inherited from QObject

Detailed Description

Represents a network interface.

The QNetworkSettingsInterface class represents a network interface attached to the host.

Instances of this class cannot be created directly. Instead, they can be retrieved via QNetworkSettingsManager::interfaces().

Property Documentation

name : const QString

Holds the name of the network interface.

Access functions:

QString name() const

Notifier signal:

void nameChanged()

powered : bool

Holds whether the network interface is powered on of off.

Access functions:

bool powered() const
void setPowered(const bool powered)

Notifier signal:

void poweredChanged()

state : const QNetworkSettingsState::States

Holds the state of the network interface.

Access functions:

QNetworkSettingsState::States state()

Notifier signal:

void stateChanged()

See also QNetworkSettingsState::States.

type : const QNetworkSettingsType::Types

Holds the type of the network interface.

Access functions:

QNetworkSettingsType::Types type()

Notifier signal:

void typeChanged()

See also QNetworkSettingsType::Types.

Member Function Documentation

QNetworkSettingsInterface::QNetworkSettingsInterface(QObject *parent = Q_NULLPTR)

Creates a new network interface with the parent parent.

[protected] QNetworkSettingsInterface::QNetworkSettingsInterface(const QNetworkSettingsInterface &)

Default constructs an instance of QNetworkSettingsInterface.

QString QNetworkSettingsInterface::name() const

Returns the name of the network interface.

Note: Getter function for property name.

bool QNetworkSettingsInterface::powered() const

Returns whether the network interface is powered on or off.

Note: Getter function for property powered.

See also setPowered().

void QNetworkSettingsInterface::scanServices()

Initiates a scan for network interface services.

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

void QNetworkSettingsInterface::setPowered(const bool powered)

Sets the powered state in the network interface to powered.

Note: Setter function for property powered.

See also powered().

QNetworkSettingsState::States QNetworkSettingsInterface::state()

Returns the state of the network interface.

Note: Getter function for property state.

QNetworkSettingsType::Types QNetworkSettingsInterface::type()

Returns the type of the network interface.

Note: Getter function for property type.

[protected] QNetworkSettingsInterface &QNetworkSettingsInterface::operator=(const QNetworkSettingsInterface &)

Copy-assignment operator.

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