class QLibraryInfo

The QLibraryInfo class provides information about the Qt library. More

Synopsis

Static functions

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

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 conf

class LibraryPath

This enum type is used to query for a specific path:

Constant

Description

QLibraryInfo.PrefixPath

The default prefix for all paths.

QLibraryInfo.DocumentationPath

The path to documentation upon install.

QLibraryInfo.HeadersPath

The path to all headers.

QLibraryInfo.LibrariesPath

The path to installed libraries.

QLibraryInfo.LibraryExecutablesPath

The path to installed executables required by libraries at runtime.

QLibraryInfo.BinariesPath

The path to installed Qt binaries (tools and applications).

QLibraryInfo.PluginsPath

The path to installed Qt plugins.

QLibraryInfo.QmlImportsPath

The path to installed QML extensions to import.

QLibraryInfo.Qml2ImportsPath

This value is deprecated. Use QmlImportsPath instead.

QLibraryInfo.ArchDataPath

The path to general architecture-dependent Qt data.

QLibraryInfo.DataPath

The path to general architecture-independent Qt data.

QLibraryInfo.TranslationsPath

The path to translation information for Qt strings.

QLibraryInfo.ExamplesPath

The path to examples upon install.

QLibraryInfo.TestsPath

The path to installed Qt testcases.

QLibraryInfo.SettingsPath

The path to Qt settings. Not applicable on Windows.

See also

path()

static build()
Return type:

str

static isDebugBuild()
Return type:

bool

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

static isSharedBuild()
Return type:

bool

Returns true if this is a shared (dynamic) build of Qt.

static location(location)
Parameters:

locationLibraryPath

Return type:

str

Note

This function is deprecated.

Use path() instead.

Returns the path specified by loc.

static path(p)
Parameters:

pLibraryPath

Return type:

str

Returns the path specified by p.

If there is more than one path listed in qt.conf, it will only return the first one.

See also

paths

static paths(p)
Parameters:

pLibraryPath

Return type:

list of strings

Returns all paths specificied by p.

See also

path

static platformPluginArguments(platformName)
Parameters:

platformName – str

Return type:

list of strings

static version()
Return type:

QVersionNumber

Returns the version of the Qt library.

See also

qVersion()