summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/src/richtext.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/src/richtext.qdoc')
-rw-r--r--src/gui/doc/src/richtext.qdoc109
1 files changed, 64 insertions, 45 deletions
diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc
index 24fd4240b3..10d9962850 100644
--- a/src/gui/doc/src/richtext.qdoc
+++ b/src/gui/doc/src/richtext.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\group richtext-processing
@@ -35,10 +11,9 @@
\page richtext.html
\title Rich Text Processing
\brief An overview of Qt's rich text processing, editing and display features.
-
+ \ingroup explanations-ui
\ingroup frameworks-technologies
\ingroup qt-basic-concepts
- \ingroup best-practices
\nextpage Rich Text Document Structure
@@ -83,7 +58,6 @@
/*!
\page richtext-structure.html
- \contentspage richtext.html Contents
\previouspage Rich Text Processing
\nextpage The QTextCursor Interface
@@ -180,8 +154,7 @@
We obtain the root frame in the following manner:
- \snippet textdocument-frames/xmlwriter.h 0
- \snippet textdocument-frames/xmlwriter.cpp 0
+ \snippet textdocument-frames/mainwindow.cpp rootframe
When navigating the document structure, it is useful to begin at the
root frame because it provides access to the entire document structure.
@@ -267,8 +240,7 @@
child frames. We can inspect the contents of a frame by using a
QTextFrame::iterator to traverse the frame's child elements:
- \snippet textdocument-frames/xmlwriter.cpp 1
- \snippet textdocument-frames/xmlwriter.cpp 2
+ \snippet textdocument-frames/mainwindow.cpp 4
Note that the iterator selects both frames and blocks, so it is necessary
to check which it is referring to. This allows us to navigate the document
@@ -292,8 +264,7 @@
document, we can test whether it represents a table, and deal with it in a
different way:
- \snippet textdocument-tables/xmlwriter.cpp 0
- \snippet textdocument-tables/xmlwriter.cpp 1
+ \snippet textdocument-tables/mainwindow.cpp 13
The cells within an existing table can be examined by iterating through
the rows and columns.
@@ -349,7 +320,6 @@
/*!
\page richtext-cursor.html
- \contentspage richtext.html Contents
\previouspage Rich Text Document Structure
\nextpage Document Layouts
@@ -656,7 +626,6 @@
/*!
\page richtext-layouts.html
- \contentspage richtext.html Contents
\previouspage The QTextCursor Interface
\nextpage Common Rich Text Editing Tasks
@@ -707,7 +676,6 @@
/*!
\page richtext-common-tasks.html
- \contentspage richtext.html Contents
\previouspage Document Layouts
\nextpage Advanced Rich Text Processing
@@ -800,7 +768,6 @@
/*!
\page richtext-advanced-processing.html
- \contentspage richtext.html Contents
\previouspage Common Rich Text Editing Tasks
\nextpage Supported HTML Subset
@@ -849,7 +816,6 @@
\title Supported HTML Subset
\brief Describes the support for HTML markup in text widgets.
- \contentspage richtext.html Contents
\previouspage Common Rich Text Editing Tasks
Qt's text widgets are able to display rich text, specified using a subset of \l {http://www.w3.org/TR/html401/}{HTML 4}
@@ -872,7 +838,11 @@
\section1 Supported Tags
The following table lists the HTML tags supported by Qt's
- \l{Rich Text Processing}{rich text} engine:
+ \l{Rich Text Processing}{rich text} engine.
+
+ \note The functionality implemented for tags listed below is a subset of
+ the full HTML 4 specification. Not all attributes are supported,
+ see comments for each tag.
\table 70%
\header \li Tag
@@ -1197,16 +1167,16 @@
\li none | dotted | dashed | dot-dash | dot-dot-dash | solid | double | groove | ridge | inset | outset
\li Border style for text tables and table cells.
\row \li \c border-top-style
- \li <color>
+ \li <border-style>
\li Top border style for table cells.
\row \li \c border-bottom-style
- \li <color>
+ \li <border-style>
\li Bottom border style for table cells.
\row \li \c border-left-style
- \li <color>
+ \li <border-style>
\li Left border style for table cells.
\row \li \c border-right-style
- \li <color>
+ \li <border-style>
\li Right border style for table cells.
\row \li \c border-width
\li <width>px
@@ -1269,6 +1239,55 @@
\row \li \c word-spacing
\li <width>px
\li Specifies an alternate spacing between each word.
+ \row \li \c line-height
+ \li <number>[% | px | pt | cm]
+ \li Specifies the height of a line. It can be one of the
+ following:
+ \list
+ \li fixed line height in pixels, points, or centimeters.
+ \li a percentage of the current font size.
+ \endlist
+ \endtable
+
+ \section1 Qt-specific CSS properties
+
+ Besides the standard CSS properties listed earlier, the following
+ Qt-specific properties can also be used to style a text block:
+
+ \table
+ \header \li Property
+ \li Values
+ \li Description
+ \row
+ \li \c -qt-block-indent
+ \li \c <number>
+ \li Indents the text block by the specified no. spaces.
+ \row
+ \li \c -qt-list-indent
+ \li \c <number>
+ \li Indents the list items by the specified no. of spaces.
+ \row
+ \li \c -qt-list-number-prefix
+ \li \c <string>
+ \li Prefixes the given string to list number in an HTML ordered list.
+ \row
+ \li \c -qt-list-number-suffix
+ \li <string>
+ \li Suffixes the given string to list number in an HTML ordered list.
+ \row
+ \li \c -qt-paragraph-type
+ \li \c empty
+ \li Hides the text block.
+ \row
+ \li \c -qt-table-type
+ \li \c{root | frame}
+ \li \c root renders the text blocks inline without borders and
+ indentation, whereas \c frame renders them on a new line
+ with a frame around.
+ \row
+ \li \c -qt-user-state
+ \li \c <number>
+ \li Adds it as user data for the text block.
\endtable
\section1 Supported CSS Selectors