Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions

Deploying Qt Applications

Deploying an Qt application does not require any C++ programming. All you need to do is to build Qt and your application in release mode, following the procedures described in this documentation. We will demonstrate the procedures in terms of deploying the Plug & Paint application that is provided in Qt's examples directory.

There are two ways of deploying an application:

Static linking results in a stand-alone executable. The advantage is that you will only have a few files to deploy. The disadvantages are that the executables are large and with no flexibility (i.e a new version of the application, or of Qt, will require that the deployment process is repeated), and that you cannot deploy plugins.

To deploy plugin-based applications, you can use the shared library approach. Shared libraries also provide smaller, more flexible executables. For example, using the shared library approach, the user is able to independently upgrade the Qt library used by the application.

Another reason why you might want to use the shared library approach, is if you want to use the same Qt libraries for a family of applications. In fact, if you download the binary installation of Qt, you get Qt as a shared library.

The disadvantage with the shared library approach is that you will get more files to deploy.

Qt's Libraries

Since Qt is not a system library, it has to be redistributed along with your application; the minimum is to redistribute the run-time of the libraries used by the application. Using static linking, however, the Qt run-time is compiled into the executable.

In particular, you will need to deploy Qt plugins, such as JPEG support or SQL drivers. For more information about plugins, see the How to Create Qt Plugins documentation.

When deploying an application using the shared library approach you must ensure that the Qt libraries will use the correct path to find the Qt plugins, documentation, translation etc. To do this you can use a qt.conf file. For more information, see the Using qt.conf documentation.

Depending on configuration, compiler specific libraries must be redistributed as well. For more information, see the platform specific Application Dependencies sections: X11, Windows, Mac.

The procedure of deploying Qt applications is different for the various platforms:

See also Installation and Window System Specific Notes.

Copyright © 2008 Nokia Trademarks
Qt 4.4.3