Qt-3.2.1

Introduction to Qt

The Qt package contains a C++ GUI library. This is useful for creating graphical applications or executing graphical applications that are dynamically linked to the Qt library.

Package information

Installation of Qt

bash
export QTDIR=$PWD &&
export LD_LIBRARY_PATH=$QTDIR/lib &&
export PATH=$QTDIR/bin:$PATH &&

./configure -prefix /opt/qt-3.2.1 -qt-gif -system-libpng \
   -system-libmng -system-zlib -system-libjpeg -no-g++-exceptions \
   -thread &&

make &&
make install &&

ln -sfn /opt/qt-3.2.1 /opt/qt &&
ln -s /opt/qt/lib/libqt-mt.so /opt/qt/lib/libqt.so &&
cp -r doc/man /opt/qt/doc &&
cp -r examples /opt/qt/doc

exit

Note: The build time for Qt is quite long. If you want to save some time and don't want the tutorials and examples, change the first make line above to:

make sub-tools

Command explanations

bash: This command enters a sub-shell to isolate environment changes.

export QTDIR=$PWD: This command defines where the root of the Qt directory is located.

export LD_LIBRARY_PATH=$QTDIR/lib: This command sets up the location of libraries for the build process.

export PATH=$QTDIR/bin:$PATH: This command allows the build process to find supporting executables.

-prefix /opt/qt-3.2.1: This command sets up the install destination.

-qt-gif: This command adds support for gif files to the libraries.

-system-libpng -system-libmng -system-zlib -system-libjpeg: This command forces the library to use the shared libraries that are on your system instead of recreating its own set of support libraries for these functions.

-no-g++-exceptions: This command disables the exceptions coding generated by the C++ compiler.

-thread: This command compiles the library to support multi-threading.

ln -sfn /opt/qt-3.2.1 /opt/qt: This command standardizes the location of the Qt libraries to the ld.so.conf entry described below.

ln -s /opt/qt/lib/libqt-mt.so /opt/qt/lib/libqt.so: This command allows configure scripts to find a working Qt installation.

cp -r doc/man /opt/qt/doc: This command installs the man directory which is missed by make install.

cp -r examples /opt/qt/doc: This command installs the examples directory which is missed by make install.

exit: This command returns to the parent shell and eliminates envirnment variables set earlier.

Configuring Qt

Configuration Information

As with most libraries, there is no configuration to do, save that the library directory /opt/qt/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. The following command will add it if it is missing:

cat >> /etc/ld.so.conf << "EOF"
# Begin qt addition to /etc/ld.so.conf

/opt/qt/lib

# End qt addition
EOF
ldconfig

You need to add the path for the Qt man pages to the man.conf file. This can be done with the following command:

cat >> /etc/man.conf << "EOF"
# Begin qt addition to man.conf

MANPATH /opt/qt/doc/man

# End qt addition to man.conf
EOF

Contents

The Qt package contains the libqt-mt libraries and libqui libraries.

Description

Qt library

The Qt/X11 library contains API's necessary to use KDE programs.