Installing Qt/X11

Table of contents:

Installing Qt X11

To install Qt on X11, you may need to be root, depending on the permissions of the directory where you choose to install Qt.

  1. Change directory to where you want to install Qt. For example:

    cd /usr/local
  2. Unpack the archive file from the CD:

    cp /cdrom/x11/qt-x11-free3.2.1.tar.gz.
    gunzip qt-x11-free-3.2.1.tar.gz
    tar xf qt-x11-free-3.2.1.tar

    This will create the directory qt-x11-free-3.2.1, assuming that your CD-ROM is mounted at /cdrom.

  3. Set up certain environment variables for Qt.

    The variables are set differently depending on which shell you are using. For example, if your user name is gregory, you can find out which shell you are using with the finger command:

    finger gregory

    If your shell is bash, ksh, zsh, or sh, add the following lines to the .profile file in your home directory:


    If your shell is csh or tcsh, add the following lines to your .login file:

    setenv QTDIR /usr/local/qt-x11-free-3.2.1
    setenv PATH $QTDIR/bin:$PATH
    setenv MANPATH $QTDIR/doc/man:$MANPATH

    If you encounter "undefined variable" problems, change the last two lines above to these:

    setenv MANPATH $QTDIR/doc/man
    setenv LD_LIBRARY_PATH $QTDIR/lib

    Irrespective of which shell you use, if you install Qt on AIX, replace all occurrences of LD_LIBRARY_PATH with LIBPATH. And if you install Qt on HP-UX, replace LD_LIBRARY_PATH with SHLIB_PATH.

    After you have done this, you must either login again or re-source the .profile or .login file before continuing.

  4. Execute the configure tool with your preferred options to build the Qt library and the tools supplied with it:

    cd $QTDIR

    You can run ./configure -help to get a list of configuration options. For example, you can use the -thread option to create a threaded version of the library.

  5. Type make.

If you want to customize how you install Qt or if you encounter problems with installing Qt, refer to the INSTALL file in $QTDIR for more information.

Part I: Basic Qt

Getting Started

Creating Dialogs

Creating Main Windows

Implementing Application Functionality

Creating Custom Widgets

Part II: Intermediate Qt

Layout Management

Event Processing

2D and 3D Graphics

Drag and Drop


Container Classes





Providing Online Help


Platform-Specific Features

C++ GUI Programming with Qt 3
C++ GUI Programming with Qt 3
ISBN: 0131240722
EAN: 2147483647
Year: 2006
Pages: 140 © 2008-2020.
If you may any questions please contact us: