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

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \page creator-build-example-application.html
    \previouspage creator-tutorials.html
    \nextpage creator-how-tos.html

    \ingroup creator-tutorials

    \keyword {Building and Running an Example}
    \title Tutorial: Build and run

    \brief How to build and run a Qt example.

    To test that your \l{Get and Install Qt}{\QOI} installation is successful,
    open an existing example application project.

    To run an example application on an Android or iOS device, you must set up
    the development environment for Android or iOS. For more information, see
    \l{Developing for Android} and \l{Developing for iOS}.

    To run an example application on a \B2Q device, you must set up
    \B2Q on the development host and create connections
    between the host and devices. For more information, see
    \l{\B2Q: Documentation}.

    If you have \l{Qt Design Studio documentation}{\QDS} installed, you can open
    \QDS examples from \QC in \QDS.

    \list 1

        \li In the \uicontrol Welcome mode, select \uicontrol Examples (1).

            \image {qtcreator-examples-open.webp} {Selecting an example}

            If you cannot see any examples, check that the list of
            \l{Add Qt versions}{Qt versions} (2) is not empty. If
            you select a Qt for Android or iOS, you can only see the
            examples that run on Android or iOS.

        \li Select an example in the list of examples.

            You can also use tags (3) to filter examples. For instance, enter
            the \uicontrol \B2Q tag (commercial only) in the search field
            (4) to list examples that you can run on \B2Q devices.

        \li In \uicontrol {Configure Project}, select
            \l{Kits}{kits} for building the example for the
            target platforms.

            \image {qtcreator-configure-project.webp} {Configure Project view}

        \li Select \uicontrol {Configure Project}.

        \li To check that you can compile and link the application code for a
            device, click the \uicontrol {Kit Selector} and select the kit for
            the device.

            \image {qtcreator-examples-kit-selector.webp} {Selecting a kit to build with}

            If you installed \QC as part of a Qt installation, it should have
            automatically detected the installed kit. If you cannot see any kits,
            see \l{Add kits}.

        \li Select \inlineimage icons/run_small.png
            (\uicontrol Run) to build and run the application.

        \li To see the compilation progress, select \key{Alt+4} to open
            \l {Compile Output}.

            If build errors occur, check that you have a Qt version, a
            \l{Add compilers}{compiler}, and the necessary kits installed. If
            you are building for an Android or iOS device, check that you set up
            the development environment correctly.

            The \uicontrol Build progress bar on the toolbar turns green when
            you build the project successfully. The application opens on the
            device.

    \endlist

    \sa {Manage Kits}{How To: Manage Kits}, {Open projects},
    {Developing for Android}, {Developing for iOS},
    {Compile Output}, {\B2Q: Documentation}, {Qt Design Studio documentation}
*/
