/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/

// **********************************************************************
// 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.
// **********************************************************************

/*!
    \contentspage {Qt Creator Manual}
    \previouspage creator-faq.html
    \page creator-tips.html
    \nextpage creator-known-issues.html

    \title Tips and Tricks

    \section1 Switching Between Modes

    \QC uses different modes for different purposes. You can quickly
    switch between these modes with the following keyboard shortcuts:

    \list

        \li \uicontrol Welcome mode \key Ctrl+1
        \li \uicontrol Edit mode \key Ctrl+2
        \li \uicontrol Design mode \key Ctrl+3
        \li \uicontrol Debug mode \key Ctrl+4
        \li \uicontrol Projects mode \key Ctrl+5
        \li \uicontrol Help mode \key Ctrl+6

    \endlist

    For more information about \QC modes, see \l {Modes}.

    \section1 Moving Between Open Files

    To quickly move between currently open files, press
    \key Ctrl+Tab.

    To move forward in the location history, press \key {Alt+Right}
    (\key {Cmd+Opt+Right} on \macos). To move backward, press \key {Alt+Left}
    (\key {Cmd+Opt+Left} on \macos). For example, if you use the \uicontrol Locator
    to jump to a symbol in the same file, you can jump back to your original
    location in that file by pressing \key {Alt+Left}.

    \section1 Moving To the Edit Mode

    To move to the \uicontrol Edit mode and currently active file, press
    \key Esc.

    If you already are in the \uicontrol Edit mode:

    \list

        \li The first press moves focus to the editor

        \li The second press closes secondary windows

    \endlist

    \section1 Using the Filter in Options Dialog

    To find specific settings you require in \uicontrol{Tools} > \uicontrol{Options}
    use the filter located at the top left of the \uicontrol Options dialog box.

    \section1 Opening Output Panes

    The output panes provide a list of errors and warnings encountered during
    a build, detailed output from the compiler, status of a program when it is
    executed and debug output, as well as search results.

    To open output panes, use the following shortcuts:

    \list

        \li \uicontrol{Issues} pane Alt+1 (Cmd+1 on \macos)

        \li \uicontrol{Search Results} pane Alt+2 (Cmd+2 on \macos)

        \li \uicontrol{Application Output} pane Alt+3 (Cmd+3 on \macos)

        \li \uicontrol{Compile Output} pane Alt+4 (Cmd+4 on \macos)

    \endlist

    To open the other output panes, such as \uicontrol{General Messages} and
    \uicontrol{Version Control}, select \uicontrol Window > \uicontrol {Output Panes}. The menu
    items also display the keyboard shortcuts that you can use.

    For more information about output panes, see \l{Viewing Output}.

    \section1 Using Keyboard Shortcuts

    \QC provides \l{Keyboard Shortcuts}{many useful keyboard shortcuts}.
    You can see the keyboard shortcut for a menu command in the menu
    or the tooltip for a button.

    To customize, import or export keyboard shortcuts, select \uicontrol Tools >
    \uicontrol Options > \uicontrol Environment > \uicontrol Keyboard.

    \section1 Running \QC From Command Line

    You can launch \QC from command line using the name of an
    existing session or \c .pro file by giving the name as the command
    argument.

    For example, running \tt{qtcreator somesession}, launches \QC and
    loads session somesession.

    For more information, see \l{Using Command Line Options}.

    \section1 Showing and Hiding Sidebars

    You can toggle the left and right sidebar in some \QC modes.

    To toggle the left sidebar, click \inlineimage leftsidebaricon.png
    (\uicontrol {Hide Left Sidebar/Show Left Sidebar}) or press \key Alt+0
    (\key Cmd+0 on \macos).

    To toggle the right sidebar, click \inlineimage rightsidebaricon.png
    (\uicontrol {Hide Right Sidebar/Show Right Sidebar}) or press
    \key Alt+Shift+0 (\key Cmd+Shift+0 on \macos).

    For more information on using the sidebars, see
    \l {Browsing Project Contents}.

    \section1 Moving To Symbols

    To move straight to a symbol used in a project, select the symbol in the
    \uicontrol Editor toolbar drop-down menu. For more information on the editor
    toolbar, see \l {Using the Editor Toolbar}.

    To jump to a symbol in the current file, press \key {Ctrl+K} to open the
    \uicontrol Locator, enter a period (.), and start typing the symbol name. Then
    select the symbol in the list. For more information on using the locator,
    see \l{Searching with the Locator}.

    Press \key Ctrl (\key Cmd on \macos) and click a symbol to move directly to
    the definition or the declaration of the symbol. You can also move the
    cursor on the symbol and press \key {F2}. For more information, see
    \l{Moving to Symbol Definition or Declaration}.

    \section1 Displaying Signals and Slots

    If an instance of a class is derived from QObject, and you would like to
    find all other objects connected to one of your object's slots using
    Qt's signals and slots mechanism, select \uicontrol Tools > \uicontrol Options
    > \uicontrol{Debugger} > \uicontrol{Locals and Expressions} >
    \uicontrol{Use Debugging Helper}.

    In the \uicontrol{Locals and Expressions} view, expand the object's entry and open
    the slot in the \e slots subitem. The objects connected to this slot are
    shown as children of the slot. This method works with signals too.

    For more information about the \uicontrol{Locals and Expressions} view, see
    \l{Locals and Expressions}.

    \section1 Displaying Low Level Data

    If special debugging of Qt objects fails due to data corruption within the
    debugged objects, you can switch off the debugging helpers. When debugging
    helpers are switched off low-level structures become visible.

    To switch off the debugging helpers:
    \list 1

        \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Debugger >
            \uicontrol{Locals and Expressions}.

        \li Uncheck the \uicontrol{Use Debugging Helper} checkbox.

    \endlist

    \section1 Showing Tooltips in Debug Mode

    To inspect the value of variables from the editor, you can turn
    on tooltips. Tooltips are hidden by default for performance reasons.

    \list 1

        \li Select \uicontrol Tools > \uicontrol Options >
            \uicontrol Debugger > \uicontrol General.

        \li Select the \uicontrol {Use tooltips in main editor while debugging} check
            box.

    \endlist

    When you hover over a variable in the code editor in \uicontrol Debug mode, a
    tooltip is displayed. To keep the tooltip visible, click the pin button.
    You can expand pinned tooltips to view their full content.

    \image qtcreator-pin-tooltip.png

    Pinned tooltips are stored in the session. To close all pinned tooltips,
    select \uicontrol {Close Editor Tooltips} in the context menu in the \uicontrol {Locals
    and Expressions} view.

    \section1 Locating Files

    The \uicontrol Locator provides one of the easiest ways in \QC to browse
    through projects, files, classes, functions, documentation and file systems.
    To quickly access files not directly mentioned in your project, you can
    create your own locator filters. That way you can locate files in a
    directory structure you have defined.

    To create locator filters, select \uicontrol {Tools > Options > Locator > Add}.

    For more information, see \l{Creating Locator Filters}.

    \section1 Adding a License Header Template for C++ Code

    A file containing a license header for C++ can be specified under
    \uicontrol{Tools > Options > C++ > License Template}. It may contain special
    placeholders enclosed in \c{%%} that are replaced when generating a
    new file:

    \list 1

        \li \c %YEAR%: Year
        \li \c %MONTH%: Month
        \li \c %DAY%: Day of the month
        \li \c %DATE%: Date
        \li \c %USER%: Username
        \li \c %FILENAME%: File name
        \li \c %CLASS%: Class name (if applicable)
        \li \c %$VARIABLE%: Contents of environment variable \c{VARIABLE}.

    \endlist

    \section1 Pasting from Clipboard History

    \QC stores copied text in clipboard history. To retrieve clips from the
    history, press \key {Ctrl+Shift+V} until the clip appears.
    The number of clips in the history is fixed to 10.

    \section1 Sorting Lines Alphabetically

    To sort selected lines alphabetically, select \uicontrol Edit >
    \uicontrol Advanced > \uicontrol {Sort Selected Lines} or press
    \key {Alt+Shift+S} (or \key Ctrl+Shift+S on \macos).

*/
