diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-10 18:21:52 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-10 18:21:52 (GMT) |
commit | d501b04974df3615ac12fa93e11e893a44fbe715 (patch) | |
tree | d64aca21919cfccd005dcdf9d912c8577ab08467 /src/gui/text/qstatictext.cpp | |
parent | 5a438bd30cf7d92309cbff51da523b7faea335f5 (diff) | |
parent | c21f95aab2228168452d1d7bb4e332a8c6164a02 (diff) | |
download | Qt-d501b04974df3615ac12fa93e11e893a44fbe715.zip Qt-d501b04974df3615ac12fa93e11e893a44fbe715.tar.gz Qt-d501b04974df3615ac12fa93e11e893a44fbe715.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (26 commits)
Added one test for QRegExp
QMetaObject::normalizeSignature avoid reading past the string in case of invalid signature given.
Add text decoration support to QStaticText
Fix QString::arg: When specifying %L1, the group separator would be added even if the local specify QLocale::OmitGroupSeparator
QtDeclarative: get rid of warnings in public header
doc: Clarify documentation of QStaticText
Fix scrollbar randomly popping up in QPlainTextEdit
Remove the definition of QT_HAVE_NEON from qt.prf
Use the fast Neon conversion for converting colors of jpeg images.
Do the conversion from RGB888 to RGB32 using Neon
Move the build of Neon file from painting.pri to gui.pro
QSharedPointer documentation: specify that it is not safe to operate on the same object in different threads
compilation with QT_NO_DEPRECATED
Test we do not have compiler warnings in our headers with more options
QStyleSheet documentation: QMenu's tear-off is styled with ::tearoff
Doc: Fixed qdoc warnings.
Fix QTextEngine overflow caused by extremely long text
Replace the SSE prologues by a macro
QDom: Do not crash on "<a:>text</a:>"
Doc: Fixed typo.
...
Diffstat (limited to 'src/gui/text/qstatictext.cpp')
-rw-r--r-- | src/gui/text/qstatictext.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 7396bcd..21c2e02 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -109,10 +109,18 @@ QT_BEGIN_NAMESPACE QPainter::drawStaticText() and can change from call to call with a minimal impact on performance. - QStaticText will attempt to guess the format of the input text using Qt::mightBeRichText(). - To force QStaticText to display its contents as either plain text or rich text, use the - function QStaticText::setTextFormat() and pass in, respectively, Qt::PlainText and - Qt::RichText. + For extra convenience, it is possible to apply formatting to the text using the HTML subset + supported by QTextDocument. QStaticText will attempt to guess the format of the input text using + Qt::mightBeRichText(), and interpret it as rich text if this function returns true. To force + QStaticText to display its contents as either plain text or rich text, use the function + QStaticText::setTextFormat() and pass in, respectively, Qt::PlainText and Qt::RichText. + + QStaticText can only represent text, so only HTML tags which alter the layout or appearance of + the text will be respected. Adding an image to the input HTML, for instance, will cause the + image to be included as part of the layout, affecting the positions of the text glyphs, but it + will not be displayed. The result will be an empty area the size of the image in the output. + Similarly, using tables will cause the text to be laid out in table format, but the borders + will not be drawn. If it's the first time the static text is drawn, or if the static text, or the painter's font has been altered since the last time it was drawn, the text's layout has to be |