summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-17 14:16:21 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:55:59 (GMT)
commit5ea1825ec7a19a9b02eacf5c6f558536e085c510 (patch)
treec2de3bafcf0aaa7b7bc345f31c2d5dae6376a376 /src/gui/text/qstatictext.cpp
parent5290c50b240abbcd0477df1db1808d33b96ca856 (diff)
downloadQt-5ea1825ec7a19a9b02eacf5c6f558536e085c510.zip
Qt-5ea1825ec7a19a9b02eacf5c6f558536e085c510.tar.gz
Qt-5ea1825ec7a19a9b02eacf5c6f558536e085c510.tar.bz2
Some documentation fixes
Clarify the use of transformations combined with static texts.
Diffstat (limited to 'src/gui/text/qstatictext.cpp')
-rw-r--r--src/gui/text/qstatictext.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index e6f2cc6..5b0b471 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -42,6 +42,7 @@
#include "qstatictext.h"
#include "qstatictext_p.h"
#include <private/qtextengine_p.h>
+#include <private/qfontengine_p.h>
#include <QtGui/qapplication.h>
@@ -60,9 +61,11 @@ QT_BEGIN_NAMESPACE
more efficiently than by using QPainter::drawText() in which the layout information is
recalculated with every call.
- The class primarily provides an optimization for cases where text is static over several paint
- events. If the text or its layout is changed regularly, QPainter::drawText() is the more
- efficient alternative.
+ The class primarily provides an optimization for cases where text and the transformations on
+ the painter are static over several paint events. If the text or its layout is changed
+ regularly, QPainter::drawText() is the more efficient alternative. Translating the painter
+ will not affect the performance of drawStaticText(), but altering any other parts of the
+ painter's transformation will cause the layout of the static text to be recalculated.
\code
class MyWidget: public QWidget
@@ -91,7 +94,7 @@ QT_BEGIN_NAMESPACE
If you set a maximum size on the QStaticText object, this will bound the text. The text will
be formatted so that no line exceeds the given width. When the object is painted, it will
- be clipped vertically at the given height. The position of the text is decided by the argument
+ be clipped at the given size. The position of the text is decided by the argument
passed to QPainter::drawStaticText() and can change from call to call without affecting
performance.