1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/doc/src/installation.qdoc -->
7
<title>Qt 4.0: Installing Qt/Mac</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Installing Qt/Mac</h1>
22
<li>If you have the commercial edition of Qt, install your license file as <tt>$HOME/.qt-license</tt>.<p>For the open source version you do not need a license file.</p>
24
<li>Unpack the archive if you have not done so already:<pre> cd /tmp
25
gunzip qt-x11-opensource-desktop-4.0.0.tar.gz # uncompress the archive
26
tar xvf qt-x11-opensource-desktop-4.0.0.tar # unpack it</pre>
27
<p>This creates the directory <tt>/tmp/qt-x11-opensource-desktop-4.0.0</tt> containing the files from the archive.</p>
29
<li>Building<p>To configure the Qt library for your machine type:</p>
30
<pre> cd /tmp/qt-x11-opensource-desktop-4.0.0
32
<p>Type <tt>./configure -help</tt> to get a list of all available options.</p>
33
<p>To create the library and compile all the demos, examples, tools, and tutorials, type:</p>
34
<pre> make</pre>
35
<p>To install the library, demos, examples, tools, and tutorials, type:</p>
36
<pre> su -c "make install"</pre>
37
<p>and enter the root password. Qt is by default installed into <tt>/usr/local/Trolltech/Qt-4.0.0</tt> but this can be changed by using the <tt>-prefix</tt> parameter.</p>
39
<li>Environment variables<p>In order to use Qt, some environment variables need to be extended.</p>
40
<pre> PATH - to locate qmake, moc and other Qt tools</pre>
41
<p>This is done like this:</p>
42
<p>In <tt>.profile</tt> (if your shell is bash), add the following lines:</p>
43
<pre> PATH=/usr/local/Trolltech/Qt-4.0.0/bin:$PATH
45
<p>In <tt>.login</tt> (in case your shell is csh or tcsh), add the following line:</p>
46
<pre> setenv PATH /usr/local/Trolltech/Qt-4.0.0/bin:$PATH</pre>
47
<p>If you use a different shell, please modify your environment variables accordingly.</p>
49
<li>That's all. Qt is now installed.<p>If you are new to Qt, we suggest that you take a look at the demos and examples to see Qt in action. Run the Qt Examples and Demos either by typing <tt>qtdemo</tt> on the command line or through the desktop's Start menu.</p>
50
<p>You might also want to try the following links:</p>
52
<li><a href="http://doc.trolltech.com/4.0/how-to-learn-qt.html">http://doc.trolltech.com/4.0/how-to-learn-qt.html</a></li>
53
<li><a href="http://doc.trolltech.com/4.0/tutorial.html">http://doc.trolltech.com/4.0/tutorial.html</a></li>
54
<li><a href="http://www.trolltech.com/developer">http://www.trolltech.com/developer</a></li>
58
<p>We hope you will enjoy using Qt. Good luck!</p>
59
<p /><address><hr /><div align="center">
60
<table width="100%" cellspacing="0" border="0"><tr class="address">
61
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
62
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
63
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
64
</tr></table></div></address></body>