Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 814a2b4c48f3ef6444b2ff5bf854d05a > files > 242

qtconnectivity5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- scanner.qdoc -->
  <title>QML Bluetooth Scanner Example | Qt Bluetooth 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtbluetooth-index.html">Qt Bluetooth</a></td><td >QML Bluetooth Scanner Example</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtbluetooth-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#running-the-example">Running the Example</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QML Bluetooth Scanner Example</h1>
<span class="subtitle"></span>
<!-- $$$scanner-brief -->
<p>A QML example about locating Bluetooth devices.</p>
<!-- @@@scanner -->
<!-- $$$scanner-description -->
<div class="descr"> <a name="details"></a>
<p>This is an example on how to locate Bluetooth devices in QML.</p>
<p>The user has the choice to run three different types of Bluetooth scans. The device retrieves information about the remote device within Bluetooth range. This implies that the remote device can be discovered. The picture below demonstrates the potential result of such a search:</p>
<p class="centerAlign"><img src="images/devicescan.png" alt="" /></p><p>The second and third type of scan dicover the types of services offered by each remote device. A full service discovery can take quite some time to finish. The local device connects to each remote device and performs an SDP enquiry. The results of such an enquiry can be seen below.</p>
<p class="centerAlign"><img src="images/servicescan.png" alt="" /></p><p>In general a service discovery is based on the results of a previously run device enquiry. A minimal service discovery returns the same data set as a full discovery except that the results are retrieved from local cache information and may not always be complete and accurate. The primary reason to perform a minimal discovery are time constraints. A full service discovery can take up to two minutes. Note that not every platform supports a minimal discovery. In such cases the API performs a full discovery.</p>
<a name="running-the-example"></a>
<h2 id="running-the-example">Running the Example</h2>
<p>To run the example from Qt Creator, open the <b>Welcome</b> mode and select the example from <b>Examples</b>. For more information, visit Building and Running an Example.</p>
<p>Files:</p>
<ul>
<li><a href="qtbluetooth-scanner-button-qml.html">scanner/Button.qml</a></li>
<li><a href="qtbluetooth-scanner-qmlscanner-cpp.html">scanner/qmlscanner.cpp</a></li>
<li><a href="qtbluetooth-scanner-scanner-pro.html">scanner/scanner.pro</a></li>
<li><a href="qtbluetooth-scanner-scanner-qml.html">scanner/scanner.qml</a></li>
<li><a href="qtbluetooth-scanner-scanner-qrc.html">scanner/scanner.qrc</a></li>
</ul>
<p>Images:</p>
<ul>
<li><a href="images/used-in-examples/scanner/default.png">scanner/default.png</a></li>
</ul>
</div>
<p><b>See also </b><a href="qtbluetooth-index.html">Qt Bluetooth</a>.</p>
<!-- @@@scanner -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    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. </p>
</div>
</body>
</html>