2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2020 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
2019-07-05 14:14:29 +02:00
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
\previouspage creator-live-preview-desktop.html
|
|
|
|
|
\page creator-live-preview-devices.html
|
2021-12-09 11:35:00 +02:00
|
|
|
\if defined(qtdesignstudio)
|
|
|
|
|
\nextpage creator-live-preview-android.html
|
|
|
|
|
\else
|
2019-10-23 15:31:30 +02:00
|
|
|
\nextpage qt-design-viewer.html
|
2021-12-09 11:35:00 +02:00
|
|
|
\endif
|
2019-07-05 14:14:29 +02:00
|
|
|
\title Previewing on Devices
|
|
|
|
|
|
|
|
|
|
To preview UIs on Android devices, you need to enable USB debugging on them
|
|
|
|
|
and connect them to your system with a USB cable.
|
2021-09-08 14:49:14 +02:00
|
|
|
|
2020-05-20 13:06:11 +02:00
|
|
|
To preview UIs on Boot2Qt devices, you need to connect the devices to your
|
2019-07-05 14:14:29 +02:00
|
|
|
system with a USB cable, or a wired or wireless connection, depending on
|
|
|
|
|
the device, and configure connections to them. The necessary kits have been
|
|
|
|
|
predefined and you only need to enable them 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.
|
|
|
|
|
|
2023-10-18 15:31:42 +03:00
|
|
|
\note To preview on a wirelessly connected device, select \preferences > \uicontrol Devices
|
|
|
|
|
and connect the device.
|
|
|
|
|
|
2019-07-05 14:14:29 +02:00
|
|
|
To preview a UI on a device:
|
|
|
|
|
|
|
|
|
|
\list 1
|
2023-10-18 15:31:42 +03:00
|
|
|
\if defined(qtcreator)
|
2019-07-05 14:14:29 +02:00
|
|
|
\li In \uicontrol Projects > \uicontrol {Build & Run}, enable the kit
|
|
|
|
|
predefined for the device type (1).
|
|
|
|
|
\li Select the kit for the device in the kit selector (2).
|
|
|
|
|
\image qtcreator-live-preview-kit.png
|
2023-10-18 15:31:42 +03:00
|
|
|
\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
|
2019-07-05 14:14:29 +02:00
|
|
|
\li Select \uicontrol Build > \uicontrol {QML Preview} or
|
|
|
|
|
press \key {Alt+P}.
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
\section2 Previewing on Android Devices
|
|
|
|
|
|
|
|
|
|
The USB debugging feature on Android devices enables creating connections
|
2021-09-08 14:49:14 +02:00
|
|
|
to the devices from \QDS and running the preview utility on them.
|
2019-07-05 14:14:29 +02:00
|
|
|
|
|
|
|
|
Debugging is enabled in different ways on different Android devices.
|
|
|
|
|
Look for \uicontrol {USB Debugging} under \uicontrol {Developer Options}.
|
|
|
|
|
On some devices \uicontrol {Developer Options} is hidden and becomes visible
|
|
|
|
|
when you tap the \uicontrol {Build number} field in \uicontrol Settings >
|
|
|
|
|
\uicontrol About several times.
|
|
|
|
|
|
|
|
|
|
After you have enabled debugging, connect the Android device to the system
|
|
|
|
|
with a USB cable.
|
|
|
|
|
|
|
|
|
|
The first time you preview a UI on devices, the preview utility
|
|
|
|
|
is copied to them. This might take some time. Thereafter, previewing will
|
2022-07-11 15:30:22 +02:00
|
|
|
get faster because only the UI files need to be copied to the
|
2019-07-05 14:14:29 +02:00
|
|
|
device.
|
|
|
|
|
|
2020-05-20 13:06:11 +02:00
|
|
|
\section2 Previewing on Boot2Qt Devices
|
2019-07-05 14:14:29 +02:00
|
|
|
|
2022-04-07 12:45:21 +02:00
|
|
|
You can preview UIs on Boot2Qt devices. For a list of supported devices, see
|
|
|
|
|
\l{https://doc.qt.io/Boot2Qt/qtdc-supported-platforms.html}
|
|
|
|
|
{Boot2Qt: Supported Target Devices and Development Hosts}.
|
2019-07-05 14:14:29 +02:00
|
|
|
|
|
|
|
|
You must configure the device as instructed in the
|
2022-04-07 12:45:21 +02:00
|
|
|
\l{https://doc.qt.io/Boot2Qt/b2qt-installation-guides.html}
|
|
|
|
|
{Boot2Qt: Installation Guides}.
|
2019-07-05 14:14:29 +02:00
|
|
|
|
|
|
|
|
\note At the time of this writing, \macos is not supported as a development
|
2022-04-07 12:45:21 +02:00
|
|
|
host for Boot2Qt. This means that you cannot preview UIs on
|
|
|
|
|
devices if you are using \QC on \macos. For more information, see
|
|
|
|
|
\l {https://doc.qt.io/Boot2Qt/qtdc-supported-platforms.html#supported-development-hosts}
|
|
|
|
|
{Boot2Qt: Supported Development Hosts}.
|
2019-07-05 14:14:29 +02:00
|
|
|
*/
|