diff options
Diffstat (limited to 'doc/src/snippets/code')
-rw-r--r-- | doc/src/snippets/code/src_gui_text_qtextlayout.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp index ad5725e..13040ea 100644 --- a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp +++ b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp @@ -42,7 +42,6 @@ //! [0] int leading = fontMetrics.leading(); qreal height = 0; -qreal widthUsed = 0; textLayout.beginLayout(); while (1) { QTextLine line = textLayout.createLine(); @@ -53,7 +52,6 @@ while (1) { height += leading; line.setPosition(QPointF(0, height)); height += line.height(); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); } textLayout.endLayout(); //! [0] |