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

/*!
    \page creator-project-managing-workspaces.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-design-qtquick

    \title Use workspaces

    \QMLD provides a flexible UI, allowing you to arrange views freely and save
    your setups as \e workspaces. You can also use one of the predefined workspaces.

    To change the current workspace, go to \uicontrol View >
    \uicontrol Workspaces.

    \section1 Move views in a workspace

    To move a view to a different location in the workspace, drag it from the
    title bar to its new position. You can either dock the view in a dock area
    or detach the view from a dock area.

    \image {qtcreator-workspace-attaching-views.webp} {Moving a view to a dock area.}

    \note You can also move view groups.

    To close a group of views, right-click the group top bar and select
    \uicontrol {Close Group}. To close all other groups, select
    \uicontrol {Close Other Groups}.

    To detach a group of views, right-click the group top bar and select
    \uicontrol {Detach Group}.

    To open closed views, select \uicontrol View > \uicontrol Views.

    \note To lock all views, go to \uicontrol View > \uicontrol Workspaces and
    select \uicontrol {Lock Workspaces}.

    \section1 Manage workspaces

    To manage your workspaces, open \uicontrol {Workspace Manager} from \uicontrol View >
    \uicontrol Workspaces > \uicontrol Manage.

    \image {qtcreator-workspace-manager.webp} {The Workspace Manager dialog.}

    In \uicontrol {Workspace Manager}, you can create, rename, clone, delete, reset,
    import, and export workspaces, as well as move them up and down in the list.

    \section2 Restore a workspace on startup

    The changes you make to a workspace are saved when you close \QC.
    In \uicontrol {Workspace Manager}, select \uicontrol {Restore last workspace on startup}
    to restore the current workspace the next time you start \QC.

    \section2 Create a custom workspace

    To save a workspace as a custom workspace after making changes in the workspace:

    \list 1
        \li Go to \uicontrol View > \uicontrol Workspaces > \uicontrol Manage to open
        \uicontrol {Workspace Manager}.
        \li Select \uicontrol New.
            \image {qtcreator-workspace-new.webp} {The New Workspace Name dialog.}
        \li Enter a name for the workspace.
        \li Select \uicontrol Create to create a new empty workspace or
            \uicontrol {Create and Open} to create a workspace and
            switch to it.
    \endlist

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

