QLibraryInfo Class

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

Header: #include <QLibraryInfo>
qmake: QT += core

Public Types

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

Static Public Members

bool isDebugBuild()
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 and built. This class provides an abstraction for accessing that information. By using the static functions of this class, an application can obtain information about the instance of the Qt library which the application is using at run-time.

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 Type Documentation

enum QLibraryInfo::LibraryLocation

This enum type is used to specify a specific location specifier:

QLibraryInfo::PrefixPath0The default prefix for all paths.
QLibraryInfo::DocumentationPath1The location for documentation upon install.
QLibraryInfo::HeadersPath2The location for all headers.
QLibraryInfo::LibrariesPath3The location of installed libraries.
QLibraryInfo::LibraryExecutablesPath4The location of installed executables required by libraries at runtime.
QLibraryInfo::BinariesPath5The location of installed Qt binaries (tools and applications).
QLibraryInfo::PluginsPath6The location of installed Qt plugins.
QLibraryInfo::ImportsPath7The location of installed QML extensions to import (QML 1.x).
QLibraryInfo::Qml2ImportsPath8The location of installed QML extensions to import (QML 2.x).
QLibraryInfo::ArchDataPath9The location of general architecture-dependent Qt data.
QLibraryInfo::DataPath10The location of general architecture-independent Qt data.
QLibraryInfo::TranslationsPath11The location of translation information for Qt strings.
QLibraryInfo::ExamplesPath12The location for examples upon install.
QLibraryInfo::TestsPath13The location of installed Qt testcases.
QLibraryInfo::SettingsPath100The location for Qt settings. Not applicable on Windows.

See also location().

Member Function Documentation

[static] bool QLibraryInfo::isDebugBuild()

Returns true if this build of Qt was built with debugging enabled, or false if it was built in release mode.

This function was introduced in Qt 5.0.

[static] QString QLibraryInfo::licensedProducts()

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

See also licensee().

[static] QString QLibraryInfo::licensee()

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

See also licensedProducts().

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

Returns the location specified by loc.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.