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

« back to all changes in this revision

Viewing changes to doc/html/qmake-common-projects.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/doc/src/qmake-manual.qdoc -->
 
5
<!-- qmake-manual.qdoc -->
6
6
<head>
7
 
  <title>Qt 4.5: qmake Common Projects</title>
 
7
  <title>Qt 4.6: qmake Common Projects</title>
8
8
  <link rel="prev" href="qmake-tutorial.html" />
9
9
  <link rel="contents" href="qmake-manual.html" />
10
10
  <link rel="next" href="qmake-using.html" />
13
13
<body>
14
14
<table border="0" cellpadding="0" cellspacing="0" width="100%">
15
15
<tr>
16
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
17
 
<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="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
18
 
<td align="right" valign="top" width="230"></td></tr></table><p>
 
16
<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>
 
17
<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>
 
18
</tr></table><p>
19
19
[Previous: <a href="qmake-tutorial.html">qmake Tutorial</a>]
20
20
[<a href="qmake-manual.html">Contents</a>]
21
21
[Next: <a href="qmake-using.html">Using qmake</a>]
43
43
<a name="the-app-template"></a>
44
44
<h3>The app Template</h3>
45
45
<p>The <tt>app</tt> template tells <tt>qmake</tt> to generate a Makefile that will build an application. With this template, the type of application can be specified by adding one of the following options to the <tt>CONFIG</tt> variable definition:</p>
46
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
46
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
47
47
<thead><tr valign="top" class="qt-style"><th>Option</th><th>Description</th></tr></thead>
48
48
<tr valign="top" class="odd"><td>windows</td><td>The application is a Windows GUI application.</td></tr>
49
49
<tr valign="top" class="even"><td>console</td><td><tt>app</tt> template only: the application is a Windows console application.</td></tr>
52
52
<ul>
53
53
<li>HEADERS - A list of all the header files for the application.</li>
54
54
<li>SOURCES - A list of all the source files for the application.</li>
55
 
<li>FORMS - A list of all the .ui files (created using <tt>Qt Designer</tt>) for the application.</li>
 
55
<li>FORMS - A list of all the UI files (created using <tt>Qt Designer</tt>) for the application.</li>
56
56
<li>LEXSOURCES - A list of all the lex source files for the application.</li>
57
57
<li>YACCSOURCES - A list of all the yacc source files for the application.</li>
58
58
<li>TARGET - Name of the executable for the application. This defaults to the name of the project file. (The extension, if any, is added automatically).</li>
65
65
<li><a href="qmake-variable-reference.html#rc-file">RC_FILE</a> - Windows only: A resource file for the application.</li>
66
66
<li><a href="qmake-variable-reference.html#res-file">RES_FILE</a> - Windows only: A resource file to be linked against for the application.</li>
67
67
</ul>
68
 
<p>You only need to use the system variables that you have values for, for instance, if you don't have any extra INCLUDEPATHs then you don't need to specify any, <tt>qmake</tt> will add in the default ones needed. For instance, an example project file might look like this:</p>
 
68
<p>You only need to use the system variables that you have values for, for instance, if you do not have any extra INCLUDEPATHs then you do not need to specify any, <tt>qmake</tt> will add in the default ones needed. For instance, an example project file might look like this:</p>
69
69
<pre> TEMPLATE = app
70
70
 DESTDIR  = c:/helloapp
71
71
 HEADERS += hello.h
80
80
<h3>The lib Template</h3>
81
81
<p>The <tt>lib</tt> template tells <tt>qmake</tt> to generate a Makefile that will build a library. When using this template, in addition to the system variables mentioned above for the <tt>app</tt> template the <tt>VERSION</tt> variable is supported. You should use these in your .pro file to specify information about the library.</p>
82
82
<p>When using the <tt>lib</tt> template, the following options can be added to the <tt>CONFIG</tt> variable to determine the type of library that is built:</p>
83
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
83
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
84
84
<thead><tr valign="top" class="qt-style"><th>Option</th><th>Description</th></tr></thead>
85
85
<tr valign="top" class="odd"><td>dll</td><td>The library is a shared library (dll).</td></tr>
86
86
<tr valign="top" class="even"><td>staticlib</td><td>The library is a static library.</td></tr>
101
101
<h3>Building a Qt Designer Plugin</h3>
102
102
<p><i>Qt Designer</i> plugins are built using a specific set of configuration settings that depend on the way Qt was configured for your system. For convenience, these settings can be enabled by adding <tt>designer</tt> to the project's <tt>CONFIG</tt> variable. For example:</p>
103
103
<pre> CONFIG      += designer plugin</pre>
104
 
<p>See the <a href="examples.html#qt-designer">Qt Designer examples</a> for more examples of plugin-based projects.</p>
 
104
<p>See the <a href="examples-designer.html">Qt Designer Examples</a> for more examples of plugin-based projects.</p>
105
105
<a name="building-and-installing-in-debug-and-release-modes"></a>
106
106
<h2>Building and Installing in Debug and Release Modes</h2>
107
107
<p>Sometimes, it is necessary to build a project in both debug and release modes. Although the <tt>CONFIG</tt> variable can hold both <tt>debug</tt> and <tt>release</tt> options, the <tt>debug</tt> option overrides the <tt>release</tt> option.</p>
139
139
</p>
140
140
<p /><address><hr /><div align="center">
141
141
<table width="100%" cellspacing="0" border="0"><tr class="address">
142
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
143
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
144
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
145
 
</tr></table></div></address></body>
 
142
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
143
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
144
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
145
<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>
146
146
</html>