IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QLibraryInfo Class

The QLibraryInfo class provides information about the Qt library.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QLibraryInfo Class

  • Header: QLibraryInfo

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Core)

    target_link_libraries(mytarget PRIVATE Qt6::Core)

  • qmake: QT += core

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

Member Type Documentation

 

enum QLibraryInfo::LibraryPath

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

Constant

Value

Description

QLibraryInfo::PrefixPath

0

The default prefix for all paths.

QLibraryInfo::DocumentationPath

1

The path to documentation upon install.

QLibraryInfo::HeadersPath

2

The path to all headers.

QLibraryInfo::LibrariesPath

3

The path to installed libraries.

QLibraryInfo::LibraryExecutablesPath

4

The path to installed executables required by libraries at runtime.

QLibraryInfo::BinariesPath

5

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

QLibraryInfo::PluginsPath

6

The path to installed Qt plugins.

QLibraryInfo::QmlImportsPath

7

The path to installed QML extensions to import.

QLibraryInfo::Qml2ImportsPath

QmlImportsPath

This value is deprecated. Use QmlImportsPath instead.

QLibraryInfo::ArchDataPath

8

The path to general architecture-dependent Qt data.

QLibraryInfo::DataPath

9

The path to general architecture-independent Qt data.

QLibraryInfo::TranslationsPath

10

The path to translation information for Qt strings.

QLibraryInfo::ExamplesPath

11

The path to examples upon install.

QLibraryInfo::TestsPath

12

The path to installed Qt testcases.

QLibraryInfo::SettingsPath

100

The path to Qt settings. Not applicable on Windows.

See Also

See also path()

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.

[static, since 6.5] bool QLibraryInfo::isSharedBuild()

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

This function was introduced in Qt 6.5.

[static, since 6.0] QString QLibraryInfo::path(QLibraryInfo::LibraryPath p)

Returns the path specified by p.

This function was introduced in Qt 6.0.

[static] QVersionNumber QLibraryInfo::version()

Returns the version of the Qt library.

See Also

See also qVersion()

Obsolete Members for QLibraryInfo

The following members of class QLibraryInfo are deprecated. We strongly advise against using them in new code.

Obsolete Member Type Documentation

 
[alias] QLibraryInfo::LibraryLocation

This typedef is deprecated. We strongly advise against using it in new code.

Use LibraryPath with QLibraryInfo::path() instead.

Obsolete Member Function Documentation

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

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use path() instead.

Returns the path specified by loc.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+