2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2018 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
// **********************************************************************
|
|
|
|
|
// 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.
|
|
|
|
|
// **********************************************************************
|
|
|
|
|
|
|
|
|
|
/*!
|
2011-12-13 11:52:47 +01:00
|
|
|
\previouspage creator-using-qt-designer.html
|
2011-09-27 11:59:26 +02:00
|
|
|
\page adding-plugins.html
|
2021-06-24 16:12:26 +02:00
|
|
|
\nextpage creator-usability.html
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
\title Adding Qt Designer Plugins
|
|
|
|
|
|
|
|
|
|
You can use Qt APIs to create plugins that extend Qt applications.
|
2011-12-13 11:52:47 +01:00
|
|
|
This enables you to add your own widgets to \QD.
|
2011-09-27 11:59:26 +02:00
|
|
|
The most flexible way to include a plugin with an application is to compile
|
|
|
|
|
it into a dynamic library that is shipped separately, and detected and
|
|
|
|
|
loaded at runtime.
|
|
|
|
|
|
|
|
|
|
The applications can detect plugins that are stored 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
|
2013-11-25 17:37:19 +01:00
|
|
|
\l{Using Custom Widgets with Qt Designer}.
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
\section1 Locating Qt Designer 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
|
2014-03-14 16:02:01 +01:00
|
|
|
and integrated into \QC. The correct folder to place the plugins depends on
|
|
|
|
|
whether you use the standalone \QD or the integrated \QD.
|
2011-09-27 11:59:26 +02:00
|
|
|
|
2023-06-12 11:45:51 +02:00
|
|
|
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.
|
2011-09-27 11:59:26 +02:00
|
|
|
|
2015-08-04 15:46:12 +02:00
|
|
|
To check which plugins were loaded successfully and which failed, choose
|
|
|
|
|
\uicontrol Tools > \uicontrol {Form Editor} >
|
|
|
|
|
\uicontrol {About Qt Designer Plugins}.
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
The standalone \QD is part of the Qt library used for building projects,
|
2015-08-04 15:46:12 +02:00
|
|
|
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,
|
2023-10-26 13:22:49 +02:00
|
|
|
choose \uicontrol Help > \uicontrol {About Plugins} on Linux and Windows
|
|
|
|
|
(or \uicontrol {\QC} > \uicontrol {About Plugins} on \macos).
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
\section1 Matching Build Keys
|
|
|
|
|
|
2014-03-14 16:02:01 +01:00
|
|
|
The \QC that is included in pre-built Qt packages on Windows is built with
|
2023-06-12 11:45:51 +02:00
|
|
|
the Microsoft Visual Studio compiler. If you install a Qt version that was built
|
|
|
|
|
with the \MinGW/g++ compiler, plugins built with this version of Qt cannot be
|
|
|
|
|
loaded by \QC 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
|
|
|
|
|
Qt Creator was built with, or that is otherwise incompatible.
|
|
|
|
|
The plugins can then only be used in the standalone
|
2020-04-02 11:46:41 +02:00
|
|
|
version of \QD. Choose \uicontrol Help > \uicontrol {About \QC} to check the
|
2023-06-12 11:45:51 +02:00
|
|
|
Qt version and compiler that \QC was built with.
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
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
|
2023-06-12 11:45:51 +02:00
|
|
|
\MinGW or installing a Qt version that was built with Microsoft Visual Studio,
|
|
|
|
|
depending on which configuration you want to use for your applications.
|
2011-09-27 11:59:26 +02:00
|
|
|
|
|
|
|
|
*/
|