QXmlStreamNamespaceDeclaration Class
QXmlStreamNamespaceDeclaration 类表示一个命名空间声明。更多内容...
| 头文件: | #include <QXmlStreamNamespaceDeclaration> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
- 所有成员列表,包括继承的成员
- QXmlStreamNamespaceDeclaration 属于XML 类。
注意:该类中的所有函数均为可重入的。
QXmlStreamNamespaceDeclaration 比较
| 类别 | 可比较类型 |
|---|---|
| 相等性 | QXmlStreamNamespaceDeclaration |
公共函数
| QXmlStreamNamespaceDeclaration() | |
| QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri) | |
| QStringView | namespaceUri() const |
| QStringView | prefix() const |
相关的非成员
| QXmlStreamNamespaceDeclarations | |
| bool | operator!=(const QXmlStreamNamespaceDeclaration &lhs, const QXmlStreamNamespaceDeclaration &rhs) |
| bool | operator==(const QXmlStreamNamespaceDeclaration &lhs, const QXmlStreamNamespaceDeclaration &rhs) |
详细说明
命名空间声明由prefix()和namespaceUri()组成。
成员函数文档
QXmlStreamNamespaceDeclaration::QXmlStreamNamespaceDeclaration()
创建一个空的命名空间声明。
QXmlStreamNamespaceDeclaration::QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri)
创建一个包含prefix 和namespaceUri 的命名空间声明。
QStringView QXmlStreamNamespaceDeclaration::namespaceUri() const
返回 namespaceUri。
QStringView QXmlStreamNamespaceDeclaration::prefix() const
返回前缀。
相关的非成员
QXmlStreamNamespaceDeclarations
QList<QXmlStreamNamespaceDeclaration> 的同义词。
[noexcept] bool operator!=(const QXmlStreamNamespaceDeclaration &lhs, const QXmlStreamNamespaceDeclaration &rhs)
比较命名空间声明 `lhs ` 与 `rhs `,若两者不相同,则返回 `true `;否则返回 `false`。
[noexcept] bool operator==(const QXmlStreamNamespaceDeclaration &lhs, const QXmlStreamNamespaceDeclaration &rhs)
比较命名空间声明 `lhs ` 与 `rhs `,若两者相等,则返回 `true `;否则返回 `false`。
© 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.