QLibraryInfo Class
QLibraryInfo 클래스는 Qt 라이브러리에 대한 정보를 제공합니다. 더 보기...
| 헤더: | #include <QLibraryInfo> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
공개 타입
| enum | LibraryPath { PrefixPath, DocumentationPath, HeadersPath, LibrariesPath, LibraryExecutablesPath, …, SettingsPath } |
정적 공용 멤버
| bool | isDebugBuild() |
(since 6.5) bool | isSharedBuild() |
(since 6.0) QString | path(QLibraryInfo::LibraryPath p) |
(since 6.8) QStringList | paths(QLibraryInfo::LibraryPath p) |
| QVersionNumber | version() |
상세 설명
이 클래스는 런타임 경로나 Qt 라이브러리의 빌드 구성 등, 애플리케이션이 사용하는 Qt 라이브러리에 대한 정보에 접근하기 위한 추상화를 제공합니다.
기본 런타임 경로는 Qt 빌드 구성과 Qt 라이브러리가 재배치되었는지, 그리고 애플리케이션과 함께 번들로 제공되었는지 여부에 따라 달라집니다.
배포 환경이 기본값과 일치하지 않는 경우, qt.conf 파일을 사용하여 기본 경로를 재정의할 수 있습니다. 자세한 내용은 qt.conf 사용 문서를 참조하십시오.
QSysInfo 및 qt.conf 사용도참조하십시오 .
멤버 유형 문서
enum QLibraryInfo::LibraryPath
이 열거형 유형은 특정 경로를 조회하는 데 사용됩니다:
| 상수 | 값 | 설명 |
|---|---|---|
QLibraryInfo::PrefixPath | 0 | 모든 경로의 기본 접두사입니다. |
QLibraryInfo::DocumentationPath | 1 | 설치 시 문서 경로입니다. |
QLibraryInfo::HeadersPath | 2 | 모든 헤더 파일의 경로. |
QLibraryInfo::LibrariesPath | 3 | 설치된 라이브러리의 경로입니다. |
QLibraryInfo::LibraryExecutablesPath | 4 | 런타임 시 라이브러리에 필요한 설치된 실행 파일의 경로. |
QLibraryInfo::BinariesPath | 5 | 설치된 Qt 바이너리(도구 및 애플리케이션)의 경로. |
QLibraryInfo::PluginsPath | 6 | 설치된 Qt 플러그인의 경로. |
QLibraryInfo::QmlImportsPath | 7 | 임포트할 설치된 QML 확장 기능의 경로. |
QLibraryInfo::Qml2ImportsPath | QmlImportsPath | 이 값은 더 이상 사용되지 않습니다. 대신 QmlImportsPath를 사용하십시오. |
QLibraryInfo::ArchDataPath | 8 | 아키텍처에 종속적인 일반 Qt 데이터의 경로입니다. |
QLibraryInfo::DataPath | 9 | 아키텍처에 독립적인 일반 Qt 데이터의 경로. |
QLibraryInfo::TranslationsPath | 10 | Qt 문자열에 대한 번역 정보의 경로입니다. |
QLibraryInfo::ExamplesPath | 11 | 설치 시 예제 파일이 있는 경로입니다. |
QLibraryInfo::TestsPath | 12 | 설치된 Qt 테스트 케이스의 경로입니다. |
QLibraryInfo::SettingsPath | 100 | Qt 설정의 경로. Windows에서는 적용되지 않습니다. |
path()도 참조하십시오 .
멤버 함수 문서
[static noexcept] bool QLibraryInfo::isDebugBuild()
이 Qt 빌드가 디버깅이 활성화된 상태로 빌드된 경우 ` true `를 반환하고, 릴리스 모드로 빌드된 경우 `false`를 반환합니다.
[static noexcept, since 6.5] bool QLibraryInfo::isSharedBuild()
Qt가 공유(동적) 빌드인 경우 ` true `를 반환합니다.
이 함수는 Qt 6.5에서 도입되었습니다.
[static, since 6.0] QString QLibraryInfo::path(QLibraryInfo::LibraryPath p)
p 에 지정된 경로를 반환합니다.
qt.conf에 여러 개의 경로가 나열되어 있는 경우, 첫 번째 경로만 반환합니다.
이 함수는 Qt 6.0에서 도입되었습니다.
paths도 참조하십시오 .
[static, since 6.8] QStringList QLibraryInfo::paths(QLibraryInfo::LibraryPath p)
p 에 지정된 모든 경로를 반환합니다.
이 함수는 Qt 6.8에서 도입되었습니다.
path도 참조하십시오 .
[static noexcept] QVersionNumber QLibraryInfo::version()
Qt 라이브러리의 버전을 반환합니다.
qVersion()도 참조하십시오 .
© 2026 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.