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

/*!
    \page studio-designer-developer-workflow.html
    \previouspage studio-implementing-applications.html
    \nextpage studio-debugging.html

    \title Designer-Developer Workflow

    \note In this section, you are using advanced menu items. These are not
    visible by default. To toggle the visibility of advanced menu items, see
    \l{Customizing the Menu Bar}.

    \QDS enables designers and developers to work together on common
    projects to develop applications. Designers use the \l{Design Views}{views}
    in the \uicontrol Design mode to modify \l{UI Files}{UI files} (\e .ui.qml),
    whereas developers use Qt Creator to work on the Qt Quick (\e .qml) and
    other files that are needed to implement the application logic and to
    prepare the application for production.

    \QDS \l{Creating Projects}{projects} come with boilerplate code for a
    working Qt 6 application that you can build and run in Qt Creator using
    CMake. Therefore, you can open, build, and run the projects with Qt Creator.

    \QDS continues to use the \e .qmlproject file format, while Qt Creator uses a
    \e CMakeLists.txt file as the project file. This enables you to share
    your project as a fully working C++ application with developers.

    To export a \QDS project for Qt Creator, you need:

    \list
        \li Qt Creator 13.0 or above.
        \li \QDS 4.5 or above.
    \endlist

    \section1 Exporting a \QDS Project

        \list 1
            \li \l {Creating a Project} {Create} or open your \QDS project with \QDS 4.5 or above.

                \note If you are creating a new project in \QDS, select the
                    \uicontrol {Target Qt Version} that is not higher than the Qt version
                    used in your Qt Creator.

            \li Go to \uicontrol {File} > \uicontrol {Export Project}
                > \uicontrol {Enable Automatic CMake Generation}. This creates a
                \e {CMakeLists.txt} file in your project folder.

                \note Enabling this option tracks the changes made to the project in Qt Creator
                    and automatically updates in \QDS. The connection works unless you
                    deactivate the option.

            \image studio-project-export.webp "Exporting Qt Design Studio project"
        \endlist

    \section1 Opening the \QDS Project in Qt Creator

        Open the \e {CMakeLists.txt} file in Qt Creator. To open:

        \list 1
            \li In Qt Creator, select \uicontrol File > \uicontrol {Open File or Project}.
            \li Browse through your project directory and select the \e {CMakeLists.txt}.
                Then select \uicontrol Open.

                \image studio-project-cmake-generation.webp "Project folder after CMake generation"

            \li Select the Qt version and then \uicontrol {Configure Project}.

                \note If your \QDS project was created with a more updated Qt than the one
                    available in Qt Creator, the import doesn't work. Use
                    \l {Get and Install Qt with Qt Online Installer} {Qt Online Installer}
                    to install the latest Qt version. If successfully opened, all the files are
                    accessible in the \uicontrol Projects view.

                \image qtcreator-qt-design-studio-project.webp "Qt Design studio projects in Qt Creator after successful import"
            \li To run the project, select \uicontrol Run.
        \endlist
*/
