QXmlLocator Class
QXmlLocator 클래스는 XML 핸들러 클래스에 파일 내의 구문 분석 위치에 대한 정보를 제공합니다. 더 보기...
| 헤더: | #include <QXmlLocator> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core5Compat) target_link_libraries(mytarget PRIVATE Qt6::Core5Compat) |
| qmake: | QT += core5compat |
참고: 이 클래스의 모든 함수는 재진입 가능합니다.
공개 함수
| QXmlLocator() | |
| virtual | ~QXmlLocator() |
| virtual int | columnNumber() const = 0 |
| virtual int | lineNumber() const = 0 |
상세 설명
리더는 문서 구문을 분석하기 전에 콘텐츠 핸들러에 QXmlLocator를 보고합니다. 이는 ` QXmlContentHandler::setDocumentLocator()` 함수를 통해 수행됩니다. 이제 핸들러 클래스는 이 로케이터를 사용하여 리더가 도달한 위치(`lineNumber()` 및 ` columnNumber()))`를 확인할 수 있습니다.
멤버 함수 설명서
QXmlLocator::QXmlLocator()
생성자.
[virtual noexcept] QXmlLocator::~QXmlLocator()
소멸자.
[pure virtual] int QXmlLocator::columnNumber() const
열 번호(1부터 시작)를 반환하며, 사용할 수 있는 열 번호가 없는 경우 -1을 반환합니다.
[pure virtual] int QXmlLocator::lineNumber() const
줄 번호(1부터 시작)를 반환하거나, 사용할 수 있는 줄 번호가 없는 경우 -1을 반환합니다.
© 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.