Project:Qt/Policies

General policies

 * Do not add random new packages to the  category, it is reserved for the Qt framework modules and directly related libraries and development applications from the upstream Qt Project.


 * Changes to Qt packages should be reviewed by a project member prior to being committed.


 * In the case of minor changes (e.g. typos, pkgmoved dependencies, etc.), please notify the team. Most of our packages are bumped out of the overlay and tree changes will be lost if not also made there.

Dependencies

 * Explicitly depend on all Qt modules that are used - do not rely on transitive dependencies (including ).
 * Specify the correct slot - most Qt modules have two major versions.
 * Do not specify the  subslot dependency operator - Qt module subslots are currently undefined but may be used for very specific purposes in the future.

Handling different versions of Qt
We recommend all packages with a Qt dependency follow these recommendations to ensure a consistent user experience.

Avoiding unnecessary  is important to minimise user interaction, especially as   becomes a common configuration.

Optional support for a single Qt version
For example, a CLI application with an optional Qt GUI.


 * Depending on the Qt version required, implement the appropriate USE flag: qt4 or qt5.

Optional support for one of two Qt versions
For example, a CLI application with an optional GUI that can be built with Qt 4 or Qt 5.


 * Implement both qt4 and qt5 USE flags
 * When both qt4 and qt5 USE flags are enabled, prefer qt5
 * Do not use

Optional support for two Qt versions
For example, a library with both Qt 4 and Qt 5 bindings (example: ).


 * Implement both qt4 and qt5 USE flags

Requires one of two Qt versions
For example, a Qt-based media player that can be built with either Qt 4 or Qt 5 (example: ).


 * Implement a qt5 USE flag to choose Qt 5
 * Do not implement a qt4 USE flag and do not use

Requires at least one Qt version
For example, a library with a SONAME that changes based on which Qt version it was built against (example: ).


 * Implement both qt4 and qt5 USE flags
 * Enable the qt4 USE flag by default:
 * Add
 * Use multibuild eclass instead of revision slotting (-r400, -r500)