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()
QDomComment(const QDomComment &comment)
QDomNode::NodeType nodeType() const
QDomComment &operator=(const QDomComment &other)

詳細説明

このような解析された XML のコメントは、QDomComment オブジェクトで表されます:

<!-- this is a comment -->

は、解析された Dom ツリー内の QDomComment オブジェクトで表されます。

ドキュメント・オブジェクト・モデルの詳細については、レベル 1 コアおよびレベル 2 コアを参照してください。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() を使用してください。

© 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.