Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlnetworkinformation.qdoc
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \qmltype NetworkInformation
6 \inqmlmodule QtNetwork
7 \instantiates QNetworkInformation
8 \brief Provides a cross-platform interface to network-related information.
9
10 NetworkInformation provides a cross-platform interface to network-related information.
11
12 NetworkInformation is a singleton.
13
14 \sa QNetworkInformation
15*/
16
17/*!
18 \qmlproperty enumeration NetworkInformation::reachability
19 \readonly
20
21 Holds the current state of the system's network connectivity.
22
23 \value NetworkInformation.Reachability.Unknown
24 Connection may be established but the OS has yet to confirm full
25 connectivity, or this feature is not supported.
26 \value NetworkInformation.Reachability.Disconnected
27 The system may not have connectivity at all.
28 \value NetworkInformation.Reachability.Local
29 The system is connected to a network, but might only be able to
30 access devices on the local network.
31 \value NetworkInformation.Reachability.Site
32 The system is connected to a network, but might only be able to
33 access devices on the local subnet or an intranet.
34 \value NetworkInformation.Reachability.Online
35 The system is connected to a network and able to access the Internet.
36*/
37
38/*!
39 \qmlproperty bool NetworkInformation::isBehindCaptivePortal
40 \readonly
41
42 Indicates if the user's device is currently known to be behind a captive portal.
43*/
44
45/*!
46 \qmlproperty enumeration NetworkInformation::transportMedium
47 \readonly
48
49 Holds the currently active transport medium for the application.
50
51 \value NetworkInformation.TransportMedium.Unknown
52 If the OS reports no active medium, the active medium is not recognized by Qt,
53 or the TransportMedium feature is not supported.
54 \value NetworkInformation.TransportMedium.Ethernet
55 The currently active connection is using Ethernet. Note: This value may also be
56 returned when Windows is connected to a Bluetooth personal area network.
57 \value NetworkInformation.TransportMedium.Cellular
58 The currently active connection is using a cellular network.
59 \value NetworkInformation.TransportMedium.WiFi
60 The currently active connection is using Wi-Fi.
61 \value NetworkInformation.TransportMedium.Bluetooth
62 The currently active connection is connected using Bluetooth.
63*/
64
65/*!
66 \qmlproperty bool NetworkInformation::isMetered
67 \readonly
68
69 Returns whether the current connection is (known to be) metered or not.
70*/