<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- declarative-camera.qdoc --> <title>QML Camera Example | Qt Multimedia 5.11</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 ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtmultimedia-index.html">Qt Multimedia</a></td><td ><a href="multimedia-examples.html">Qt Multimedia Examples</a></td><td >QML Camera Example</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</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> <li class="level1"><a href="#application-structure">Application Structure</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QML Camera Example</h1> <span class="subtitle"></span> <!-- $$$multimedia/declarative-camera-brief --> <p>The Camera Example shows how to use the API to capture a still image or video.</p> <!-- @@@multimedia/declarative-camera --> <!-- $$$multimedia/declarative-camera-description --> <div class="descr"> <a name="details"></a> <p class="centerAlign"><img src="images/qml-camera.png" alt="" /></p><p>This example demonstrates how to use the <a href="qtmultimedia-qmlmodule.html">Qt Multimedia QML API</a> to access camera functions. It shows how to change settings and to capture images.</p> <a name="running-the-example"></a> <h2 id="running-the-example">Running the Example</h2> <p>To run the example from <a href="http://doc.qt.io/qtcreator/index.html">Qt Creator</a>, open the <b>Welcome</b> mode and select the example from <b>Examples</b>. For more information, visit <a href="http://doc.qt.io/qtcreator/creator-build-example-application.html">Building and Running an Example</a>.</p> <a name="application-structure"></a> <h2 id="application-structure">Application Structure</h2> <p>Most of the QML code supports the user interface for this application with the camera types being mostly found in <i>declarative-camera.qml</i> and <i>CaptureControls.qml</i>.</p> <p>CaptureControls, which is implemented in <i>CaptureControls.qml</i>, generates a column on the right hand side of the screen which includes control buttons for focus (not initially visible), capture, flash modes, white balance, exposure compensation, and if a preview is available, a preview button. The last button exits from the application.</p> <p>Files:</p> <ul> <li><a href="qtmultimedia-multimedia-declarative-camera-camerabutton-qml.html">multimedia/declarative-camera/CameraButton.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-cameralistbutton-qml.html">multimedia/declarative-camera/CameraListButton.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-cameralistpopup-qml.html">multimedia/declarative-camera/CameraListPopup.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-camerapropertybutton-qml.html">multimedia/declarative-camera/CameraPropertyButton.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-camerapropertypopup-qml.html">multimedia/declarative-camera/CameraPropertyPopup.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-focusbutton-qml.html">multimedia/declarative-camera/FocusButton.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-photocapturecontrols-qml.html">multimedia/declarative-camera/PhotoCaptureControls.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-photopreview-qml.html">multimedia/declarative-camera/PhotoPreview.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-popup-qml.html">multimedia/declarative-camera/Popup.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-videocapturecontrols-qml.html">multimedia/declarative-camera/VideoCaptureControls.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-videopreview-qml.html">multimedia/declarative-camera/VideoPreview.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-zoomcontrol-qml.html">multimedia/declarative-camera/ZoomControl.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-declarative-camera-pro.html">multimedia/declarative-camera/declarative-camera.pro</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-declarative-camera-qml.html">multimedia/declarative-camera/declarative-camera.qml</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-declarative-camera-qmlproject.html">multimedia/declarative-camera/declarative-camera.qmlproject</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-declarative-camera-qrc.html">multimedia/declarative-camera/declarative-camera.qrc</a></li> <li><a href="qtmultimedia-multimedia-declarative-camera-qmlcamera-cpp.html">multimedia/declarative-camera/qmlcamera.cpp</a></li> </ul> <p>Images:</p> <ul> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_auto_mode.png">multimedia/declarative-camera/images/camera_auto_mode.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_camera_setting.png">multimedia/declarative-camera/images/camera_camera_setting.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_flash_auto.png">multimedia/declarative-camera/images/camera_flash_auto.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_flash_fill.png">multimedia/declarative-camera/images/camera_flash_fill.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_flash_off.png">multimedia/declarative-camera/images/camera_flash_off.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_flash_redeye.png">multimedia/declarative-camera/images/camera_flash_redeye.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_white_balance_cloudy.png">multimedia/declarative-camera/images/camera_white_balance_cloudy.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_white_balance_flourescent.png">multimedia/declarative-camera/images/camera_white_balance_flourescent.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_white_balance_incandescent.png">multimedia/declarative-camera/images/camera_white_balance_incandescent.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/camera_white_balance_sunny.png">multimedia/declarative-camera/images/camera_white_balance_sunny.png</a></li> <li><a href="images/used-in-examples/multimedia/declarative-camera/images/toolbutton.png">multimedia/declarative-camera/images/toolbutton.png</a></li> </ul> </div> <!-- @@@multimedia/declarative-camera --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2018 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>