summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-19 08:45:09 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-19 08:45:09 (GMT)
commit0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014 (patch)
treef9b0b9e50f70b8f24e29c1966ebd23ffa3377a40 /doc/src/snippets/code/src_gui_text_qtextlayout.cpp
parentbce9c47d5437812b137c47ff3c602ff23ffa5e22 (diff)
parent5ce428cf7f20cd37f4cf0d92ddcceddd07c5a0db (diff)
downloadQt-0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014.zip
Qt-0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014.tar.gz
Qt-0bbf0c7c189e3a3fd7860aae86d2f62d4bc77014.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'doc/src/snippets/code/src_gui_text_qtextlayout.cpp')
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextlayout.cpp2
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]