
// Copyright (C) 2023 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-project-opening.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-configure
    \ingroup creator-how-to-manage-kits
    \ingroup creator-how-to-projects

    \title Open projects

    To open a project, open the configuration file for the project:
    \e {CMakeLists.txt} or \e {CMakeCache.txt} (CMake), \e {.pro} (qmake),
    \e {.qbs} (Qbs), \e {meson.build} (Meson), \e {pyproject} (Python), or
    \e {Makefile.am} (Autotools, experimental).

    You can open a project in the following ways:

    \list
        \li Select \uicontrol File > \uicontrol {Open File or Project}.
        \li In the \uicontrol Welcome mode, \uicontrol Projects tab, select
            \uicontrol {Open Project} (1).
            \image {qtcreator-welcome-open-projects.webp} {Ways to open projects in the Welcome mode Projects tab}
        \li In the \uicontrol Projects tab, select a project in the list of
            recently opened projects (2).
        \li In the \l Projects view, right-click to open a context
            menu and select \uicontrol {Load Project} to open the
            \uicontrol {Load Project} dialog, where you can select
            a project file.
        \li Use the following keyboard shortcuts, depending on the mode you are
            currently in:
            \list
                \li In all modes, select \key Ctrl+O (\key Cmd+O on \macos) to open the
                    \uicontrol {Open File} dialog, where you can select a project file.
                \li On Windows and Linux, in all modes except the \uicontrol Help mode,
                    select \key Ctrl+Shift+O to open the \uicontrol {Load Project} dialog.
                \li In the \uicontrol Welcome mode, \uicontrol Projects tab, press
                    \key Ctrl+Shift+number (\key Cmd+Shift+number on \macos), where
                    the number is the number of a project in the list of recently opened
                    projects (3).
            \endlist
    \endlist

    \section1 Open directories as projects

    To open a directory as a project, go to \uicontrol File >
    \uicontrol {Open Workspace}.

    \QC generates the \e .qtcreator/project.json project file in the directory
    for setting a project name and file exclusion filters. You can add build and
    run settings to the file, as defined by its \l{project.json}{JSON schema}.

    You can open either the JSON file or the workspace to open the project the
    next time.

    When you add files to the directory or remove them from there, the contents
    of the \l Projects view are updated automatically.

    To add a build configuration to the workspace:

    \list 1
        \li Go to \uicontrol Projects > \uicontrol {Build & Run} >
            \uicontrol Build.
        \li Select \uicontrol Add > \uicontrol Build.
        \li Specify build settings.
    \endlist

    To specify run settings for the workspace, go to \uicontrol Projects >
    \uicontrol {Build & Run} > \uicontrol Run.

    \section1 Re-configure projects

    \QC stores information that it needs to build projects in a .user file. If
    \QC cannot find the file when you open an existing project, it prompts you
    to enter the information.

    If you used another \QC instance to create the project, \QC asks whether you
    want to use the old settings. The settings are specific to the development
    environment, and you should not copy them from one environment to another.
    Therefore, we recommend that you select \uicontrol No and enter the
    information again in the \uicontrol {Configure Project} tab.

    To re-configure projects:

    \list 1
        \li In \uicontrol {Configure Project}, select
            \l{Kits}{kits} for building
            and running your project.
            \image {qtcreator-configure-project.webp} {Configure Project view}
        \li Select \uicontrol {Configure Project}.
    \endlist

    \uicontrol {Configure Project} shows a list of kits that you
    install on the computer and configure in \preferences > \uicontrol Kits.

    Even if you do not intend to build the project, the C++ and QML code models
    need a Qt version and compiler to offer code completion. To specify them,
    select the \uicontrol Preferences link, or select \preferences >
    \uicontrol Kits.

    Qt for Python projects rely on the \l{Language Servers}
    {language server client} for code completion, highlighting, and
    other useful features.

    If \QC cannot find an existing build for a particular kit, it starts out
    from a clean slate and creates new debug and release build configurations
    in the specified directory. \QC suggests a name and location for the
    directory that you can change.

    \section1 Import builds

    If you have built the project before, \QC can use the existing build
    configuration to make the exact same build available to you. To import a
    build, specify a directory in the \uicontrol {Import Build From} section
    of the \uicontrol {Configure Project} tab and select \uicontrol {Import}.

    You can edit the build configuration later. For more information, see
    \l{Edit build configurations}.

    \section1 Show progress information

    \QC parses all the source files in the project and performs a semantic
    analysis to build up the information that it needs for functions such as
    navigation and finding usages. A progress bar is displayed during parsing.

    To show or hide detailed progress information, select
    \uicontrol {Toggle Progress Details} (1).

    \image {qtcreator-toggle-progress-bar.webp} {Toggle Progress Details button}

    You can drag the progress bar to another position. The position is saved for
    later. Select the \inlineimage icons/pin.png
    (\uicontrol Pin) button to pin the progress bar back to the toggle button.

    \sa {Configure projects for building}, {Configure projects for running},
    {Manage Kits}{How To: Manage Kits}, {Kits}
*/
