summaryrefslogtreecommitdiffstats
path: root/doc/src/designer-manual.qdoc
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-03-24 11:52:16 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-03-24 11:52:16 (GMT)
commit0df19648d2777c021e7bfe3031e097016a159e8e (patch)
tree4d9e9f9ee8730002fa08a2b6fad6837d716453fc /doc/src/designer-manual.qdoc
parent22d472c17167c4ca8df5678842768ab63b7baadd (diff)
downloadQt-0df19648d2777c021e7bfe3031e097016a159e8e.zip
Qt-0df19648d2777c021e7bfe3031e097016a159e8e.tar.gz
Qt-0df19648d2777c021e7bfe3031e097016a159e8e.tar.bz2
Add documentation about how to create shared libraries.
Reviewed-by: Paul Reviewed-by: Kavindra Devi Palaraja <kavindra.palaraja@nokia.com>
Diffstat (limited to 'doc/src/designer-manual.qdoc')
-rw-r--r--doc/src/designer-manual.qdoc43
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc
index 9eb43b7..46d3b3b 100644
--- a/doc/src/designer-manual.qdoc
+++ b/doc/src/designer-manual.qdoc
@@ -2443,6 +2443,10 @@ pixmap property in the property editor.
\target BuildingandInstallingthePlugin
\section1 Building and Installing the Plugin
+ \section2 A Simple Plugin
+
+ The \l{Custom Widget Plugin Example} demonstrates a simple \QD plugin.
+
The \c{.pro} file for a plugin must specify the headers and sources for
both the custom widget and the plugin interface. Typically, this file only
has to specify that the plugin's project is to be built as a library, but
@@ -2477,6 +2481,45 @@ pixmap property in the property editor.
See QCoreApplication::libraryPaths() for more information about customizing
paths for libraries and plugins with Qt applications.
+ \section2 Splitting up the Plugin
+
+ In a real world scenario, you do not want to have dependencies of the
+ application making use of the custom widgets to the \QD headers and
+ libraries as introduced by the simple approach explained above.
+
+ There are two ways to resolve this:
+
+ \list
+ \i Create a \c{.pri} file that contains the headers sources and sources
+ of the custom widget:
+
+ \code
+ INCLUDEPATH += $$PWD
+ HEADERS += $$PWD/analogclock.h
+ SOURCES += $$PWD/analogclock.cpp
+ \endcode
+
+ This file would then be included by the \c{.pro} file of the plugin and
+ the application:
+
+ \code
+ include(customwidget.pri)
+ \endcode
+
+ Running \c{qmake -Wall} on the \c{.pro} files causes a warning to be
+ printed if an included \c{.pri} file cannot be found.
+
+ \i Create a standalone shared library containing the custom widgets only
+ as described in
+ \l{sharedlibrary.html}{Creating Shared Libraries}.
+
+ This library would then be used by the application as well as by the
+ \QD plugin. Care must be taken to ensure that the plugin can locate
+ the library at runtime.
+ \endlist
+
+
+
\omit
\section1 Using Qt Script to Aid in Building Forms