QDomText Class
QDomText クラスは、解析済みの XML ドキュメント内のテキストデータを表します。詳細...
| ヘッダー: | #include <QDomText> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Xml) target_link_libraries(mytarget PRIVATE Qt6::Xml) |
| qmake: | QT += xml |
| 継承元: | QDomCharacterData |
| 継承元: |
- 継承されたメンバーを含むすべてのメンバーの一覧
- QDomTextはXMLクラスの一部です。
注:このクラスのすべての関数は再入可能です。
パブリック関数
| QDomText() | |
| QDomText(const QDomText &text) | |
| QDomNode::NodeType | nodeType() const |
| QDomText | splitText(int offset) |
| QDomText & | operator=(const QDomText &other) |
詳細な説明
splitText() を使用すると、QDomText オブジェクト内のテキストを 2 つの QDomText オブジェクトに分割することができます。
Document Object Model の詳細については、Level 1およびLevel 2 Core を参照してください。DOM 実装に関するより一般的な概要については、QDomDocument のドキュメントを参照してください。
メンバ関数のドキュメント
QDomText::QDomText()
空の QDomText オブジェクトを作成します。
コンテンツを含む QDomText を生成するには、QDomDocument::createTextNode() を使用してください。
QDomText::QDomText(const QDomText &text)
text のコピーを作成します。
このコピーのデータは共有されています(浅いコピー):一方のノードを変更すると、もう一方も変更されます。深いコピーを作成したい場合は、cloneNode() を使用してください。
QDomNode::NodeType QDomText::nodeType() const
TextNode を返します。
QDomText QDomText::splitText(int offset)
このDOMテキストオブジェクトを2つのQDomText オブジェクトに分割します。このオブジェクトは最初のoffset 文字を保持し、2つ目の(新しく作成された)オブジェクトは、残りの文字を含んでこのオブジェクトの後にドキュメントツリーに挿入されます。
この関数は、新しく作成されたオブジェクトを返します。
QDomNode::normalize()も参照してください 。
QDomText &QDomText::operator=(const QDomText &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.