QDomComment Class
QDomComment クラスは、XML コメントを表します。詳細...
| ヘッダー: | #include <QDomComment> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Xml) target_link_libraries(mytarget PRIVATE Qt6::Xml) |
| qmake: | QT += xml |
| 継承元: | QDomCharacterData |
- 継承されたメンバーを含むすべてのメンバーの一覧
- QDomComment はXML クラスの一部です。
注:このクラスのすべての関数は再入可能です。
パブリック関数
| QDomComment() | |
| QDomComment(const QDomComment &comment) | |
| QDomNode::NodeType | nodeType() const |
| QDomComment & | operator=(const QDomComment &other) |
詳細な説明
解析された XML 内の次のようなコメントは、
<!-- this is a comment -->は、解析済みの DOM ツリー内で QDomComment オブジェクトによって表現されます。
Document Object Model の詳細については、Level 1およびLevel 2 Core を参照してください。DOM 実装に関するより一般的な概要については、QDomDocument のドキュメントを参照してください。
メンバ関数のドキュメント
QDomComment::QDomComment()
空のコメントを作成します。内容を含むコメントを作成するには、QDomDocument::createComment() 関数を使用してください。
QDomComment::QDomComment(const QDomComment &comment)
comment のコピーを作成します。
このコピーのデータは共有されています(浅いコピー):一方のノードを変更すると、もう一方も変更されます。深いコピーを作成したい場合は、cloneNode() を使用してください。
QDomNode::NodeType QDomComment::nodeType() const
CommentNode を返します。
QDomComment &QDomComment::operator=(const QDomComment &other)
このDOMコメントにother を割り当てます。
コピーされたデータは共有されます(浅いコピー)。つまり、一方のノードを変更すると、もう一方も変更されます。深いコピーを作成したい場合は、cloneNode() を使用してください。
© 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.