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.conf
파일을 사용하여 Qt 라이브러리에 컴파일된 하드 코딩된 경로를 재정의할 수 있습니다. 자세한 내용은 qt.conf 사용 문서를 참조하십시오.
QSysInfo 및 Using 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()
이 빌드가 디버깅이 활성화된 상태로 빌드된 경우 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()도 참조하십시오 .
© 2025 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.