// 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
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-design-qtquick

    \title Preview Qt Quick UIs on devices

    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
        \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}
        \li Go to \uicontrol Build, and select \uicontrol {QML Preview} or
            \key {Alt+P}.
    \endlist

    \section2 On Android

    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.

    \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}

    \sa {Design Qt Quick UIs}{How to: Design Qt Quick UIs}, {Qt Quick UI Design}
*/
