summaryrefslogtreecommitdiffstats
path: root/doc/html/qmake-manual-3.html
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-11-08 12:31:36 -0600
committerTimothy Pearson <[email protected]>2011-11-08 12:31:36 -0600
commitd796c9dd933ab96ec83b9a634feedd5d32e1ba3f (patch)
tree6e3dcca4f77e20ec8966c666aac7c35bd4704053 /doc/html/qmake-manual-3.html
downloadtqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.tar.gz
tqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.zip
Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731
Diffstat (limited to 'doc/html/qmake-manual-3.html')
-rw-r--r--doc/html/qmake-manual-3.html94
1 files changed, 94 insertions, 0 deletions
diff --git a/doc/html/qmake-manual-3.html b/doc/html/qmake-manual-3.html
new file mode 100644
index 000000000..fcbc82214
--- /dev/null
+++ b/doc/html/qmake-manual-3.html
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/qmake/book/qmake-tquick.leaf:3 -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>The 10 minute guide to using qmake</title>
+<style type="text/css"><!--
+fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+body { background: #ffffff; color: black; }
+--></style>
+</head>
+<body>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr bgcolor="#E5E5E5">
+<td valign=center>
+ <a href="index.html">
+<font color="#004faf">Home</font></a>
+ | <a href="classes.html">
+<font color="#004faf">All&nbsp;Classes</font></a>
+ | <a href="mainclasses.html">
+<font color="#004faf">Main&nbsp;Classes</font></a>
+ | <a href="annotated.html">
+<font color="#004faf">Annotated</font></a>
+ | <a href="groups.html">
+<font color="#004faf">Grouped&nbsp;Classes</font></a>
+ | <a href="functions.html">
+<font color="#004faf">Functions</font></a>
+</td>
+<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><p align="right">[<a href="qmake-manual-2.html">Prev: Installing qmake</a>] [<a href="qmake-manual.html">Home</a>] [<a href="qmake-manual-4.html">Next: qmake Tutorial</a>]</p>
+<h2 align="center">The 10 minute guide to using qmake</h2>
+<h3><a name="1"></a>Creating a project file</h3>
+<p><em>qmake</em> uses information stored in project (.pro) files to determine what should go in the makefiles it generates.</p>
+<p>A basic project file contains information about the application, for example, which files are needed to compile the application, and which configuration settings to use.</p>
+<p>Here's a simple example project file:</p>
+<pre>
+ SOURCES = hello.cpp
+ HEADERS = hello.h
+ CONFIG += qt warn_on release
+</pre>
+<p>We'll provide a brief line-by-line explanation, deferring the detail until later on in the manual.</p>
+<pre>
+ SOURCES = hello.cpp
+</pre>
+<p>This line specifies the source files that implement the application. In this case there is just one file, <em>hello.cpp</em>. Most applications retquire multiple files; this situation is dealt with by listing all the files on the same line space separated, like this:</p>
+<pre>
+ SOURCES = hello.cpp main.cpp
+</pre>
+<p>Alternatively, each file can be listed on a separate line, by escaping the newlines, like this:</p>
+<pre>
+ SOURCES = hello.cpp \
+ main.cpp
+</pre>
+<p>A more verbose approach is to list each file separately, like this:</p>
+<pre>
+ SOURCES += hello.cpp
+ SOURCES += main.cpp
+</pre>
+<p>This approach uses "+=" rather than "=" which is safer, because it always adds a new file to the existing list rather than replacing the list.</p>
+<p>The HEADERS line is used to specify the header files created for use by the application, e.g.</p>
+<pre>
+ HEADERS += hello.h
+</pre>
+<p>Any of the approaches used to list source files may be used for header files.</p>
+<p>The CONFIG line is used to give <em>qmake</em> information about the application's configuration.</p>
+<pre>
+ CONFIG += qt warn_on release
+</pre>
+<p>The "+=" is used here, because we add our configuration options to any that are already present. This is safer than using "=" which replaces all options with just those specified.</p>
+<p>The <em>qt</em> part of the CONFIG line tells <em>qmake</em> that the application is built using TQt. This means that <em>qmake</em> will link against the TQt libraries when linking and add in the neccesary include paths for compiling.</p>
+<p>The <em>warn_on</em> part of the CONFIG line tells <em>qmake</em> that it should set the compiler flags so that warnings are output.</p>
+<p>The <em>release</em> part of the CONFIG line tells <em>qmake</em> that the application must be built as a release application. During development, programmers may prefer to replace <em>release</em> with <em>debug</em>, which is discussed later.</p>
+<p>Project files are plain text (i.e. use an editor like notepad, vim or xemacs) and must be saved with a '.pro' extension. The name of the application's executable will be the same as the project file's name, but with an extension appropriate to the platform. For example, a project file called 'hello.pro' will produce 'hello.exe' on Windows and 'hello' on Unix.</p>
+<h3><a name="2"></a>Generating a makefile</h3>
+<p>When you have created your project file it is very easy to generate a makefile, all you need to do is go to where you have created your project file and type:</p>
+<p>Makefiles are generated from the '.pro' files like this:</p>
+<pre>
+ qmake -o Makefile hello.pro
+</pre>
+<p>For Visual Studio users, <em>qmake</em> can also generate '.dsp' files, for example:</p>
+<pre>
+ qmake -t vcapp -o hello.dsp hello.pro
+</pre>
+<!-- eof -->
+<p align="right">[<a href="qmake-manual-2.html">Prev: Installing qmake</a>] [<a href="qmake-manual.html">Home</a>] [<a href="qmake-manual-4.html">Next: qmake Tutorial</a>]</p>
+<p><address><hr><div align=center>
+<table width=100% cellspacing=0 border=0><tr>
+<td>Copyright &copy; 2007
+<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
+<td align=right><div align=right>TQt 3.3.8</div>
+</table></div></address></body>
+</html>