// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-live-preview-devices.html
    \if defined (qtdesignstudio)
    \previouspage studio-live-preview-desktop.html
    \nextpage qt-design-viewer.html

    \title Previewing on Devices

    \else
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-design

    \title Preview Qt Quick UIs on devices
    \endif

    To preview a UI on an Android device, turn on USB debugging on the device
    and connect it to the computer with a USB cable.

    To preview a UI on a \B2Q device, connect the device to the computer
    with a USB cable, or a wired or wireless connection, depending on
    the device, and configure a connection to it. The necessary kits have been
    predefined, but you need to select the one appropriate for your current
    project.

    \e {Deploy configurations} handle the packaging and copying of the
    necessary files to a location in a device where you want to run the
    executable at.

    \note To preview on a wirelessly connected device, go to \preferences >
    \uicontrol Devices and connect the device.

    To preview a UI on a device:

    \list 1
        \if defined(qtcreator)
        \li Go to \uicontrol Projects > \uicontrol {Build & Run}.
        \li Activate the kit predefined for the device type (1).
        \li Select the kit for the device in the kit selector (2).
            \image qtcreator-kit-selector-devices.webp {Kit selector}
        \else
        \li In the bottom toolbar, select \inlineimage icons/settings.png
            and enable the kit predefined for the device type.
            \image design-studio-kit-selection.webp.
        \li Select the kit for the device in the bottom toolbar.
            \image design-studio-select-kit.webp
        \endif
        \li Select \uicontrol Build > \uicontrol {QML Preview} or
            press \key {Alt+P}.
    \endlist

    \section2 On Android

    \if defined(qtcreator)
    Use the USB debugging feature on an Android device to create a connection
    to the device from \QC and run the preview utility on it.

    Debugging is turned on in different ways on different Android devices.
    Look for \uicontrol {USB Debugging} under \uicontrol {Developer Options}.
    Tap \uicontrol {Build number} in \uicontrol Settings > \uicontrol About
    several times to show \uicontrol {Developer Options}.

    After you turn on debugging, connect the Android device to the system
    with a USB cable.

    The first time you preview a UI on a device, the preview utility
    is copied to it, which might take some time. Thereafter, previewing
    gets faster because only the UI files need to be copied to the device.
    \else
    Preview \QDS projects with \QUV on an Android device.
    Learn more about \l{Viewing Applications on Android}.
    \endif

    \section2 On \B2Q

    Preview a UI on a supported \B2Q device that you configure as
    instructed in the \B2Q documentation.

    \sa {\B2Q: Documentation}, {Support Levels for Target Hardware}

    \if defined(qtcreator)
    \sa {Design UIs}{How To: Design UIs}, {UI Design}
    \endif
*/
