QTextInlineObject Class
QTextInlineObject クラスは、QAbstractTextDocumentLayout およびその実装におけるインラインオブジェクトを表します。詳細...
| ヘッダー: | #include <QTextInlineObject> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
- 継承されたメンバーを含むすべてのメンバーの一覧
- QTextInlineObject は、リッチテキスト処理 API の一部です。
注:このクラスのすべての関数は再入可能です。
パブリック関数
| qreal | ascent() const |
| qreal | descent() const |
| QTextFormat | format() const |
| int | formatIndex() const |
| qreal | height() const |
| bool | isValid() const |
| QRectF | rect() const |
| void | setAscent(qreal a) |
| void | setDescent(qreal d) |
| void | setWidth(qreal w) |
| Qt::LayoutDirection | textDirection() const |
| int | textPosition() const |
| qreal | width() const |
詳細な説明
通常、QTextInlineObject を作成する必要はありません。これは、QAbstractTextDocumentLayout がカスタムレイアウトを実装する際に、インラインオブジェクトを処理するために使用されます。
インラインオブジェクトには、setWidth()、setAscent()、setDescent() などを使用して設定できるさまざまな属性があります。インラインオブジェクトが占める矩形はrect() によって指定され、その方向はtextDirection() によって指定されます。テキストレイアウト内での位置はtextPosition() によって指定され、その書式はformat() によって指定されます。
メンバ関数のドキュメント
qreal QTextInlineObject::ascent() const
インラインオブジェクトのアセントを返します。
setAscent()、descent()、width()、およびrect()も参照してください 。
qreal QTextInlineObject::descent() const
インラインオブジェクトのデセントを返します。
setDescent()、ascent()、width()、およびrect()も参照してください 。
QTextFormat QTextInlineObject::format() const
テキストレイアウト内のインラインオブジェクトの形式を返します。
int QTextInlineObject::formatIndex() const
テキストレイアウト内のインラインオブジェクトのフォーマットを表す整数を返します。
qreal QTextInlineObject::height() const
インラインオブジェクトの合計高さを返します。これは、ascent() +descent() + 1 に等しくなります。
ascent()、descent()、width()、およびrect()も参照してください 。
bool QTextInlineObject::isValid() const
このインラインオブジェクトが有効な場合はtrue を返し、そうでない場合はfalseを返します。
QRectF QTextInlineObject::rect() const
インラインオブジェクトの矩形を返します。
ascent()、descent()、およびwidth()も参照してください 。
void QTextInlineObject::setAscent(qreal a)
インラインオブジェクトのアセントをa に設定します。
ascent()、setDescent()、width()、およびrect()も参照してください 。
void QTextInlineObject::setDescent(qreal d)
インラインオブジェクトの下降量を「d 」に設定します。
descent()、setAscent()、width()、およびrect()も参照してください 。
void QTextInlineObject::setWidth(qreal w)
インラインオブジェクトの幅をw に設定します。
width()、ascent()、descent()、およびrect()も参照してください 。
Qt::LayoutDirection QTextInlineObject::textDirection() const
オブジェクトのレイアウトを右から左にするか、左から右にするかを返します。
int QTextInlineObject::textPosition() const
テキストレイアウト内におけるインラインオブジェクトの位置。
qreal QTextInlineObject::width() const
インラインオブジェクトの幅を返します。
© 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.