// 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 adding-plugins.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-design-widgets

    \title Add \QD Plugins

    Add widgets to \QD by creating plugins that extend Qt applications.

    You can create plugins to add your own widgets to \QD. To include a plugin
    with an application, compile it into a dynamic library that you ship
    separately, and that the application detects and loads at runtime.

    The applications can detect plugins in the standard plugin
    subdirectories. For more information on how to create and locate plugins
    and to change the default plugin path, see \l{How to Create Qt Plugins}.

    For more information about how to create plugins for \QD, see
    \l{Using Custom Widgets with \QD}.

    \section1 Locate \QD plugins

    \QD fetches plugins from the standard locations and loads the plugins
    that match its build key. \QD is delivered both as a standalone application
    and integrated into \QC. The correct folder to place the plugins depends on
    whether you use the standalone \QD or the integrated \QD.

    The integrated \QD fetches plugins from the \QC installation directory.
    Designer plugins are loaded from \c {<QtCreator>\bin\plugins\designer} on Windows,
    \c {<QtCreator>/lib/Qt/plugins/designer} on Linux, and
    \c {Qt Creator.app/Contents/PlugIns/designer} on macOS.

    To check which plugins were loaded successfully and which failed, choose
    \uicontrol Tools > \uicontrol {Form Editor} >
    \uicontrol {About \QD Plugins}.

    The standalone \QD is part of the Qt library used for building projects,
    located in \c {<Qt_version>\<compiler>\bin} in the Qt installation
    directory. It fetches plugins from the \c {\plugins\designer} subdirectory
    of \c bin. To check which plugins were loaded successfully and which failed,
    choose \uicontrol Help > \uicontrol {About Plugins} on Linux and Windows
    (or \uicontrol {\QC} > \uicontrol {About Plugins} on \macos).

    \section1 Match build keys

    The \QC that is included in pre-built Qt packages on Windows is built with
    the Microsoft Visual Studio compiler. If you install a Qt version that was built
    with the \MinGW/g++ compiler, \QC cannot load plugins built with the Windows
    version because the build-keys do not match.

    The same is true if you use a Qt version that is newer than the Qt version that
    \QC was built with, or that is otherwise incompatible.
    The plugins can then only be used in the standalone
    version of \QD. Choose \uicontrol Help > \uicontrol {About \QC} to check the
    Qt version and compiler that \QC was built with.

    To use \QD plugins that were built for the shipped Qt version, make sure
    that \QC is built with the same compiler by either recompiling \QC using
    \MinGW or installing a Qt version that was built with Microsoft Visual Studio,
    depending on which configuration you want to use for your applications.

    \sa {Tutorial: Qt Widgets application}, {\QD}
*/
