~oif-team/ubuntu/natty/qt4-x11/xi2.1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- deployment.qdoc -->
<head>
  <title>Qt 4.6: Deploying Qt Applications</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
</tr></table><h1 class="title">Deploying Qt Applications<br /><span class="subtitle"></span>
</h1>
<p>Deploying an Qt application does not require any C++ programming. All you need to do is to build Qt and your application in release mode, following the procedures described in this documentation. We will demonstrate the procedures in terms of deploying the <a href="tools-plugandpaint.html">Plug &amp; Paint</a> application that is provided in Qt's examples directory.</p>
<a name="static-vs-shared-libraries"></a>
<h2>Static vs. Shared Libraries</h2>
<p>There are two ways of deploying an application:</p>
<ul>
<li>Static Linking</li>
<li>Shared Libraries (Frameworks on Mac)</li>
</ul>
<p>Static linking results in a stand-alone executable. The advantage is that you will only have a few files to deploy. The disadvantages are that the executables are large and with no flexibility (i.e a new version of the application, or of Qt, will require that the deployment process is repeated), and that you cannot deploy plugins.</p>
<p>To deploy plugin-based applications, you can use the shared library approach. Shared libraries also provide smaller, more flexible executables. For example, using the shared library approach, the user is able to independently upgrade the Qt library used by the application.</p>
<p>Another reason why you might want to use the shared library approach, is if you want to use the same Qt libraries for a family of applications. In fact, if you download the binary installation of Qt, you get Qt as a shared library.</p>
<p>The disadvantage with the shared library approach is that you will get more files to deploy. For more information, see <a href="sharedlibrary.html">Creating Shared Libraries</a>.</p>
<a name="deploying-qt-s-libraries"></a>
<h2>Deploying Qt's Libraries</h2>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th colspan="4">Qt's Libraries</th></tr></thead>
<tr valign="top" class="odd"><td><a href="qtassistant.html">QtAssistant</a></td><td><a href="qaxcontainer.html">QAxContainer</a></td><td><a href="qaxserver.html">QAxServer</a></td><td><a href="qtcore.html">QtCore</a></td></tr>
<tr valign="top" class="even"><td><a href="qtdbus.html">QtDBus</a></td><td><a href="qtdesigner.html">QtDesigner</a></td><td><a href="qtgui.html">QtGui</a></td><td><a href="qthelp.html">QtHelp</a></td></tr>
<tr valign="top" class="odd"><td><a href="qtnetwork.html">QtNetwork</a></td><td><a href="qtopengl.html">QtOpenGL</a></td><td><a href="qtscript.html">QtScript</a></td><td><a href="qtscripttools.html">QtScriptTools</a></td></tr>
<tr valign="top" class="even"><td><a href="qtsql.html">QtSql</a></td><td><a href="qtsvg.html">QtSvg</a></td><td><a href="qtwebkit.html">QtWebKit</a></td><td><a href="qtxml.html">QtXml</a></td></tr>
<tr valign="top" class="odd"><td><a href="qtxmlpatterns.html">QtXmlPatterns</a></td><td><a href="phonon-module.html">Phonon</a></td><td><a href="qt3support.html">Qt3Support</a></td></tr>
</table></p>
<p>Since Qt is not a system library, it has to be redistributed along with your application; the minimum is to redistribute the run-time of the libraries used by the application. Using static linking, however, the Qt run-time is compiled into the executable.</p>
<p>In particular, you will need to deploy Qt plugins, such as JPEG support or SQL drivers. For more information about plugins, see the <a href="plugins-howto.html">How to Create Qt Plugins</a> documentation.</p>
<p>When deploying an application using the shared library approach you must ensure that the Qt libraries will use the correct path to find the Qt plugins, documentation, translation etc. To do this you can use a <tt>qt.conf</tt> file. For more information, see the <a href="qt-conf.html">Using qt.conf</a> documentation.</p>
<p>Depending on configuration, compiler specific libraries must be redistributed as well. For more information, see the platform specific Application Dependencies sections: <a href="deployment-x11.html#application-dependencies">X11</a>, <a href="deployment-windows.html#application-dependencies">Windows</a>, <a href="deployment-mac.html#application-dependencies">Mac</a>.</p>
<a name="licensing"></a>
<h2>Licensing</h2>
<p>Some of Qt's libraries are based on third party libraries that are not licensed using the same dual-license model as Qt. As a result, care must be taken when deploying applications that use these libraries, particularly when the application is statically linked to them.</p>
<p>The following table contains an inexhaustive summary of the issues you should be aware of.</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Qt Library</th><th>Dependency</th><th>Licensing Issue</th></tr></thead>
<tr valign="top" class="odd"><td><a href="qthelp.html">QtHelp</a></td><td>CLucene</td><td>The version of clucene distributed with Qt is licensed under the GNU LGPL version 2.1 or later. This has implications for developers of closed source applications. Please see <a href="qthelp.html#license-information">the QtHelp module documentation</a> for more information.</td></tr>
<tr valign="top" class="even"><td><a href="qtnetwork.html">QtNetwork</a></td><td>OpenSSL</td><td>Some configurations of <a href="qtnetwork.html">QtNetwork</a> use OpenSSL at run-time. Deployment of OpenSSL libraries is subject to both licensing and export restrictions. More information can be found in the <a href="ssl.html">Secure Sockets Layer (SSL) Classes</a> documentation.</td></tr>
<tr valign="top" class="odd"><td><a href="qtwebkit.html">QtWebKit</a></td><td>WebKit</td><td>WebKit is licensed under the GNU LGPL version 2 or later. This has implications for developers of closed source applications. Please see <a href="qtwebkit.html#license-information">the QtWebKit module documentation</a> for more information.</td></tr>
<tr valign="top" class="even"><td><a href="phonon-module.html">Phonon</a></td><td>Phonon</td><td>Phonon relies on the native multimedia engines on different platforms. Phonon itself is licensed under the GNU LGPL version 2. Please see <a href="phonon-module.html#license-information">the Phonon module documentation</a> for more information on licensing and the <a href="phonon-overview.html#backends">Phonon Overview</a> for details of the backends in use on different platforms.</td></tr>
</table></p>
<a name="platform-specific-notes"></a>
<h2>Platform-Specific Notes</h2>
<p>The procedure of deploying Qt applications is different for the various platforms:</p>
<ul>
<li><a href="deployment-x11.html">Qt for X11 Platforms</a></li>
<li><a href="deployment-windows.html">Qt for Windows</a></li>
<li><a href="deployment-mac.html">Qt for Mac OS X</a></li>
<li><a href="qt-embedded-deployment.html">Qt for Embedded Linux</a></li>
</ul>
<p>See also <a href="installation.html">Installation</a> and <a href="platform-specific.html">Platform-Specific Documentation</a>.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
</html>