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

 #include <QLibraryInfo>

Public Types

enum LibraryLocation { PrefixPath, DocumentationPath, HeadersPath, LibrariesPath, ..., DemosPath }

Static Public Members

QDate buildDate ()
QString buildKey ()
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.

FunctionReturn value
buildKey()A string that identifies the Qt version and the configuration. This key is used to ensure that plugins link against the same version of Qt as the application.
location()The path to a certain Qt component (e.g., documentation, header files).
licensee(), licensedProducts()Licensing information.

You can also use a qt.conf file to override the hard-coded paths that are compiled into the Qt library. For more information, see the Using qt.conf documentation.

See also QSysInfo and Using qt.conf.

Member Function Documentation

QDate QLibraryInfo::buildDate () [static]

Returns the installation date for this build of Qt. The install date will usually be the last time that Qt sources were configured.

This function was introduced in Qt 4.6.

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 the QT_BUILD_KEY preprocessor symbol.

See also location().

QString QLibraryInfo::licensedProducts () [static]

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

See also licensee().

QString QLibraryInfo::licensee () [static]

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

See also licensedProducts().

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

Returns the location specified by loc.

comments powered by Disqus