|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# QLibraryInfo Class Reference

The QLibraryInfo class provides information about the Qt library. More...

    #include <QLibraryInfo>

Part of the QtCore module.

- List of all members, including inherited members

### Public Types

- enum LibraryLocation { PrefixPath, DocumentationPath, HeadersPath, LibrariesPath, ..., SettingsPath }

### Static Public Members

- QString buildKey ()
- QSettings * configuration ()
- QString licensedProducts ()
- QString licensee ()
- QString location ( LibraryLocation loc )

## Detailed Description

The QLibraryInfo class provides information about the Qt library.

Many pieces of information are established when Qt is configured. Installation paths, license information, and even a unique build key. This class provides an abstraction for accessing this information.

## Member Type Documentation

### enum QLibraryInfo::LibraryLocation

This enum type is used to specify a specific location specifier. This for use with QLibraryInfo::location.

The locations are

Constant | Value | Description
--- | --- | ---
`QLibraryInfo::PrefixPath` | `0` | The default prefix for all paths.
`QLibraryInfo::DocumentationPath` | `1` | The location for documentation upon install.
`QLibraryInfo::HeadersPath` | `2` | The location for all headers.
`QLibraryInfo::LibrariesPath` | `3` | The location of installed librarires.
`QLibraryInfo::BinariesPath` | `4` | The location of installed Qt binaries (tools and applications).
`QLibraryInfo::PluginsPath` | `5` | The location of installed Qt plugins.
`QLibraryInfo::DataPath` | `6` | The location of general Qt data.
`QLibraryInfo::TranslationsPath` | `7` | The location of translation information for Qt strings.
`QLibraryInfo::SettingsPath` | `8` | The location for Qt settings.

## Member Function Documentation

### QString QLibraryInfo::buildKey () `[static]`

Returns a unique key identifying this build of Qt and its configurations. This key is not globally unique, rather only useful for establishing of two configurations are compatible. This can be used to compare with QT_BUILD_KEY.

### QSettings * QLibraryInfo::configuration () `[static]`

Returns the active configuration information settings. This is normally only usefull for debugging but could be usefull to retrieve custom information. Do not destruct the return value as QLibrary retains ownership. Qt will automatically find the configuration file by looking (in order):

- A user argument to your application of -qtconfig <config_location>.
- A resource of the name :/qt/etc/qt.conf.
- A file of the name qt.conf in the directory from which your application executable lives. The filesystem will be walked up from that directory to the root.
- A file of the name qt.conf in the directory from which your application executable was run. The filesystem will be walked up from that directory to the root.
- An environment variable QTCONFIG.
- An environment variable QTDIR/qt.conf.
- A file in $(HOME)/.qt.conf.
- A file in /etc/qt.conf. (Unix only)
- A file in /usr/local/etc/qt.conf. (Unix only)

If no configuration can be found then zero will be returned.

See also QLibrayInfo::location and QSettings.

### QString QLibraryInfo::licensedProducts () `[static]`

Returns the products that the license for this build of Qt has access to.

See also QLibraryInfo::licensee.

### QString QLibraryInfo::licensee () `[static]`

Returns the person to whom this build of Qt is licensed.

See also QLibraryInfo::licensedProducts.

### QString QLibraryInfo::location ( LibraryLocation loc ) `[static]`

Returns the location specified by loc.

See also QLibraryInfo::LibraryLocation and QLibraryInfo::configuration.