WifiDevice QML Type

Represents a physical device. More...

Import Statement: import B2Qt.Wifi 1.0


Detailed Description

Use this element to query if a device is Wifi capable, before attempting to use the functionality of WifiManager.

import B2Qt.Wifi 1.0

GroupBox {
    id: wifiOptions
    title: "Wifi"
    visible: false

    Component.onCompleted: {
        if (WifiDevice.wifiSupported()) {
            var component = Qt.createComponent("WifiGroupBoxContent.qml")
            var wifi = component.createObject(wifiOptions.contentItem)
            if (wifi)
                wifiOptions.visible = true
        } else {
            print("Wifi functionality not available on this device.")

Method Documentation

bool wifiSupported()

Returns true if a device is Wifi capable - Wifi driver and firmware has been successfully loaded by the system, otherwise returns false.

Available under certain Qt licenses.
Find out more.