NetworkSettingsManager QML Type
A singleton QML type for managing network settings. More...
Import Statement: | import QtDeviceUtilities.NetworkSettings |
Properties
- interfaces : model
- services : model
Signals
Methods
- NetworkInterface interface(int type, int instance)
- NetworkService service(string name, int type)
- userAgent.cancelInput()
- userAgent.setPassphrase(string passphrase)
Detailed Description
There is no need to create an instance of this object. To use it, simply import the QtDeviceUtilities.NetworkSettings
module.
Qt Device Utilities WiFi Tutorial demonstrates how you can use NetworkSettingsManager for connecting to WiFi.
Property Documentation
[read-only] interfaces : model |
Holds the interface model. A delegate in a view that uses the interfaces model can access the NetworkInterface item with the dataModel role.
See also NetworkInterface.
[read-only] services : model |
Holds the service model.
The services list in the model can be controlled with the type
property, and NetworkService items can be retrieved with the itemFromRow(int index)
method. For example, to select the first available wired network service:
property var service: null ... NetworkSettingsManager.services.type = NetworkSettingsType.Wired; service = NetworkSettingsManager.services.itemFromRow(0);
Available service types:
Constant | Description |
---|---|
NetworkSettingsType.Wired | Wired network |
NetworkSettingsType.Wifi | Wifi network |
NetworkSettingsType.Bluetooth | Bluetooth network |
NetworkSettingsType.Unknown | Unknown network type |
See also NetworkService.
Signal Documentation
userAgent.error() |
This signal is emitted when the connection failed due to invalid user credentials.
Note: The corresponding handler is userAgent.onError
.
userAgent.showUserCredentialsInput() |
This signal is emitted when user credentials are required for connecting to a Wifi network.
Note: The corresponding handler is userAgent.onShowUserCredentialsInput
.
See also userAgent.setPassphrase().
Method Documentation
NetworkInterface interface(int type, int instance) |
Returns the interface with type type and order number of instance
See also NetworkInterface.
NetworkService service(string name, int type) |
Returns the service with name name and type type.
See also services.
userAgent.cancelInput() |
Cancels the user credentials input request.
userAgent.setPassphrase(string passphrase) |
Sets the passphrase for connecting to a Wifi network.
This method needs to be called in response to receiving a showUserCredentialsInput() signal.
See also userAgent.showUserCredentialsInput().
© 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.