Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 1732

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- richtext.qdoc -->
  <title>Supported HTML Subset | Qt GUI 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtgui-index.html">Qt GUI</a></td><td >Supported HTML Subset</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="richtext-common-tasks.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="richtext-common-tasks.html">Common Rich Text Editing Tasks</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#using-html-markup-in-text-widgets">Using HTML Markup in Text Widgets</a></li>
<li class="level1"><a href="#supported-tags">Supported Tags</a></li>
<li class="level1"><a href="#block-attributes">Block Attributes</a></li>
<li class="level1"><a href="#list-attributes">List Attributes</a></li>
<li class="level1"><a href="#table-cell-attributes">Table Cell Attributes</a></li>
<li class="level1"><a href="#css-properties">CSS Properties</a></li>
<li class="level1"><a href="#supported-css-selectors">Supported CSS Selectors</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Supported HTML Subset</h1>
<span class="subtitle"></span>
<!-- $$$richtext-html-subset.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt's text widgets are able to display rich text, specified using a subset of <a href="http://www.w3.org/TR/html401/">HTML 4</a> markup. Widgets that use <a href="qtextdocument.html">QTextDocument</a>, such as <a href="../qtwidgets/qlabel.html">QLabel</a> and <a href="../qtwidgets/qtextedit.html">QTextEdit</a>, are able to display rich text specified in this way.</p>
<a name="using-html-markup-in-text-widgets"></a>
<h2 id="using-html-markup-in-text-widgets">Using HTML Markup in Text Widgets</h2>
<p>Widgets automatically detect HTML markup and display rich text accordingly. For example, setting a label's <a href="../qtwidgets/qlabel.html#text-prop">text</a> property with the string <code>&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;Qt!&lt;/i&gt;&quot;</code> will result in the label displaying text like this: <b>Hello</b> <i>Qt!</i></p>
<p>When HTML markup is used for text, Qt follows the rules defined by the <a href="http://www.w3.org/TR/html401/">HTML 4</a> specification. This includes default properties for text layout, such as the direction of the text flow (left-to-right) which can be changed by applying the <a href="richtext-html-subset.html#block-attributes"><code>dir</code></a> attribute to blocks of text.</p>
<a name="supported-tags"></a>
<h2 id="supported-tags">Supported Tags</h2>
<p>The following table lists the HTML tags supported by Qt's <a href="richtext.html">rich text</a> engine:</p>
<div class="table"><table class="generic" width="70%">
 <thead><tr class="qt-style"><th >Tag</th><th >Description</th><th >Comment</th></tr></thead>
<tr valign="top" class="odd"><td ><code>a</code></td><td >Anchor or link</td><td >Supports the <code>href</code> and <code>name</code> attributes.</td></tr>
<tr valign="top" class="even"><td ><code>address</code></td><td >Address</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>b</code></td><td >Bold</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>big</code></td><td >Larger font</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>blockquote</code></td><td >Indented paragraph</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>body</code></td><td >Document body</td><td >Supports the <code>bgcolor</code> attribute, which can be a Qt <a href="qcolor.html#setNamedColor">color name</a> or a <code>#RRGGBB</code> color specification.</td></tr>
<tr valign="top" class="odd"><td ><code>br</code></td><td >Line break</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>center</code></td><td >Centered paragraph</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>cite</code></td><td >Inline citation</td><td >Same as <code>i</code>.</td></tr>
<tr valign="top" class="even"><td ><code>code</code></td><td >Code</td><td >Same as <code>tt</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>dd</code></td><td >Definition data</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>dfn</code></td><td >Definition</td><td >Same as <code>i</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>div</code></td><td >Document division</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="even"><td ><code>dl</code></td><td >Definition list</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>dt</code></td><td >Definition term</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="even"><td ><code>em</code></td><td >Emphasized</td><td >Same as <code>i</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>font</code></td><td >Font size, family, and/or color</td><td >Supports the following attributes: <code>size</code>, <code>face</code>, and <code>color</code> (Qt <a href="qcolor.html#setNamedColor">color names</a> or <code>#RRGGBB</code>).</td></tr>
<tr valign="top" class="even"><td ><code>h1</code></td><td >Level 1 heading</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>h2</code></td><td >Level 2 heading</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="even"><td ><code>h3</code></td><td >Level 3 heading</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>h4</code></td><td >Level 4 heading</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="even"><td ><code>h5</code></td><td >Level 5 heading</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>h6</code></td><td >Level 6 heading</td><td >Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="even"><td ><code>head</code></td><td >Document header</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>hr</code></td><td >Horizontal line</td><td >Supports the <code>width</code> attribute, which can be specified as an absolute or relative (<code>%</code>) value.</td></tr>
<tr valign="top" class="even"><td ><code>html</code></td><td >HTML document</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>i</code></td><td >Italic</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>img</code></td><td >Image</td><td >Supports the <code>src</code>, <code>source</code> (for Qt 3 compatibility), <code>width</code>, and <code>height</code> attributes.</td></tr>
<tr valign="top" class="odd"><td ><code>kbd</code></td><td >User-entered text</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>meta</code></td><td >Meta-information</td><td >If a text encoding is specified using the <code>meta</code> tag, it is picked up by Qt::codecForHtml(). Likewise, if an encoding is specified to <a href="qtextdocument.html#toHtml">QTextDocument::toHtml</a>(), the encoding is stored using a <code>meta</code> tag, for example:<pre class="cpp">

  <span class="operator">&lt;</span>meta http<span class="operator">-</span>equiv<span class="operator">=</span><span class="string">&quot;Content-Type&quot;</span> content<span class="operator">=</span><span class="string">&quot;text/html; charset=EUC-JP&quot;</span> <span class="operator">/</span><span class="operator">&gt;</span>

</pre>
</td></tr>
<tr valign="top" class="odd"><td ><code>li</code></td><td >List item</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>nobr</code></td><td >Non-breakable text</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>ol</code></td><td >Ordered list</td><td >Supports the standard <a href="richtext-html-subset.html#list-attributes">list attributes</a>.</td></tr>
<tr valign="top" class="even"><td ><code>p</code></td><td >Paragraph</td><td >Left-aligned by default. Supports the standard <a href="richtext-html-subset.html#block-attributes">block attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>pre</code></td><td >Preformated text</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>qt</code></td><td >Qt rich-text document</td><td >Synonym for <code>html</code>. Provided for compatibility with earlier versions of Qt.</td></tr>
<tr valign="top" class="odd"><td ><code>s</code></td><td >Strikethrough</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>samp</code></td><td >Sample code</td><td >Same as <code>tt</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>small</code></td><td >Small font</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>span</code></td><td >Grouped elements</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>strong</code></td><td >Strong</td><td >Same as <code>b</code>.</td></tr>
<tr valign="top" class="even"><td ><code>sub</code></td><td >Subscript</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>sup</code></td><td >Superscript</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>table</code></td><td >Table</td><td >Supports the following attributes: <code>border</code>, <code>bgcolor</code> (Qt <a href="qcolor.html#setNamedColor">color names</a> or <code>#RRGGBB</code>), <code>cellspacing</code>, <code>cellpadding</code>, <code>width</code> (absolute or relative), and <code>height</code>.</td></tr>
<tr valign="top" class="odd"><td ><code>tbody</code></td><td >Table body</td><td >Does nothing.</td></tr>
<tr valign="top" class="even"><td ><code>td</code></td><td >Table data cell</td><td >Supports the standard <a href="richtext-html-subset.html#table-cell-attributes">table cell attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>tfoot</code></td><td >Table footer</td><td >Does nothing.</td></tr>
<tr valign="top" class="even"><td ><code>th</code></td><td >Table header cell</td><td >Supports the standard <a href="richtext-html-subset.html#table-cell-attributes">table cell attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>thead</code></td><td >Table header</td><td >If the <code>thead</code> tag is specified, it is used when printing tables that span multiple pages.</td></tr>
<tr valign="top" class="even"><td ><code>title</code></td><td >Document title</td><td >The value specified using the <code>title</code> tag is available through <a href="qtextdocument.html#metaInformation">QTextDocument::metaInformation</a>().</td></tr>
<tr valign="top" class="odd"><td ><code>tr</code></td><td >Table row</td><td >Supports the <code>bgcolor</code> attribute, which can be a Qt <a href="qcolor.html#setNamedColor">color name</a> or a <code>#RRGGBB</code> color specification.</td></tr>
<tr valign="top" class="even"><td ><code>tt</code></td><td >Typewrite font</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>u</code></td><td >Underlined</td><td ></td></tr>
<tr valign="top" class="even"><td ><code>ul</code></td><td >Unordered list</td><td >Supports the standard <a href="richtext-html-subset.html#list-attributes">list attributes</a>.</td></tr>
<tr valign="top" class="odd"><td ><code>var</code></td><td >Variable</td><td >Same as <code>i</code>.</td></tr>
</table></div>
<a name="block-attributes"></a>
<h2 id="block-attributes">Block Attributes</h2>
<p>The following attributes are supported by the <code>div</code>, <code>dl</code>, <code>dt</code>, <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>, <code>h5</code>, <code>h6</code>, <code>p</code> tags:</p>
<ul>
<li><code>align</code> (<code>left</code>, <code>right</code>, <code>center</code>, <code>justify</code>)</li>
<li><code>dir</code> (<code>ltr</code>, <code>rtl</code>)</li>
</ul>
<a name="list-attributes"></a>
<h2 id="list-attributes">List Attributes</h2>
<p>The following attribute is supported by the <code>ol</code> and <code>ul</code> tags:</p>
<ul>
<li><code>type</code> (<code>1</code>, <code>a</code>, <code>A</code>, <code>square</code>, <code>disc</code>, <code>circle</code>)</li>
</ul>
<a name="table-cell-attributes"></a>
<h2 id="table-cell-attributes">Table Cell Attributes</h2>
<p>The following attributes are supported by the <code>td</code> and <code>th</code> tags:</p>
<ul>
<li><code>width</code> (absolute, relative, or no-value)</li>
<li><code>bgcolor</code> (Qt <a href="qcolor.html#setNamedColor">color names</a> or <code>#RRGGBB</code>)</li>
<li><code>colspan</code></li>
<li><code>rowspan</code></li>
<li><code>align</code> (<code>left</code>, <code>right</code>, <code>center</code>, <code>justify</code>)</li>
<li><code>valign</code> (<code>top</code>, <code>middle</code>, <code>bottom</code>)</li>
</ul>
<a name="css-properties"></a>
<h2 id="css-properties">CSS Properties</h2>
<p>The following table lists the CSS properties supported by Qt's <a href="richtext.html">rich text</a> engine:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Property</th><th >Values</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><code>background-color</code></td><td >&lt;color&gt;</td><td >Background color for elements</td></tr>
<tr valign="top" class="even"><td ><code>background-image</code></td><td >&lt;uri&gt;</td><td >Background image for elements</td></tr>
<tr valign="top" class="odd"><td ><code>color</code></td><td >&lt;color&gt;</td><td >Text foreground color</td></tr>
<tr valign="top" class="even"><td ><code>font-family</code></td><td >&lt;family name&gt;</td><td >Font family name</td></tr>
<tr valign="top" class="odd"><td ><code>font-size</code></td><td >[ small | medium | large | x-large | xx-large ] | &lt;size&gt;pt | &lt;size&gt;px</td><td >Font size relative to the document font, or specified in points or pixels</td></tr>
<tr valign="top" class="even"><td ><code>font-style</code></td><td >[ normal | italic | oblique ]</td><td ></td></tr>
<tr valign="top" class="odd"><td ><code>font-weight</code></td><td >[ normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ]</td><td >Specifies the font weight used for text, where <code>normal</code> and <code>bold</code> are mapped to the corresponding <a href="qfont.html">QFont</a> weights. Numeric values are 8 times the equivalent <a href="qfont.html">QFont</a> weight values.</td></tr>
<tr valign="top" class="even"><td ><code>text-decoration</code></td><td >none | [ underline || overline || line-through ]</td><td >Additional text effects</td></tr>
<tr valign="top" class="odd"><td ><code>font</code></td><td >[ [ &lt;'font-style'&gt; || &lt;'font-weight'&gt; ]? &lt;'font-size'&gt; &lt;'font-family'&gt; ]</td><td >Font shorthand property</td></tr>
<tr valign="top" class="even"><td ><code>text-indent</code></td><td >&lt;length&gt;px</td><td >First line text indentation in pixels</td></tr>
<tr valign="top" class="odd"><td ><code>white-space</code></td><td >normal | pre | nowrap | pre-wrap</td><td >Declares how whitespace in HTML is handled.</td></tr>
<tr valign="top" class="even"><td ><code>margin-top</code></td><td >&lt;length&gt;px</td><td >Top paragraph margin in pixels</td></tr>
<tr valign="top" class="odd"><td ><code>margin-bottom</code></td><td >&lt;length&gt;px</td><td >Bottom paragraph margin in pixels</td></tr>
<tr valign="top" class="even"><td ><code>margin-left</code></td><td >&lt;length&gt;px</td><td >Left paragraph margin in pixels</td></tr>
<tr valign="top" class="odd"><td ><code>margin-right</code></td><td >&lt;length&gt;px</td><td >Right paragraph margin in pixels</td></tr>
<tr valign="top" class="even"><td ><code>padding-top</code></td><td >&lt;length&gt;px</td><td >Top table cell padding in pixels</td></tr>
<tr valign="top" class="odd"><td ><code>padding-bottom</code></td><td >&lt;length&gt;px</td><td >Bottom table cell padding in pixels</td></tr>
<tr valign="top" class="even"><td ><code>padding-left</code></td><td >&lt;length&gt;px</td><td >Left table cell padding in pixels</td></tr>
<tr valign="top" class="odd"><td ><code>padding-right</code></td><td >&lt;length&gt;px</td><td >Right table cell padding in pixels</td></tr>
<tr valign="top" class="even"><td ><code>padding</code></td><td >&lt;length&gt;px</td><td >Shorthand for setting all the padding properties at once.</td></tr>
<tr valign="top" class="odd"><td ><code>vertical-align</code></td><td >baseline | sub | super | middle | top | bottom</td><td >Vertical text alignment. For vertical alignment in text table cells only middle, top, and bottom apply.</td></tr>
<tr valign="top" class="even"><td ><code>border-color</code></td><td >&lt;color&gt;</td><td >Border color for text tables.</td></tr>
<tr valign="top" class="odd"><td ><code>border-style</code></td><td >none | dotted | dashed | dot-dash | dot-dot-dash | solid | double | groove | ridge | inset | outset</td><td >Border style for text tables.</td></tr>
<tr valign="top" class="even"><td ><code>background</code></td><td >[ &lt;'background-color'&gt; || &lt;'background-image'&gt; ]</td><td >Background shorthand property</td></tr>
<tr valign="top" class="odd"><td ><code>page-break-before</code></td><td >[ auto | always ]</td><td >Make it possible to enforce a page break before the paragraph/table</td></tr>
<tr valign="top" class="even"><td ><code>page-break-after</code></td><td >[ auto | always ]</td><td >Make it possible to enforce a page break after the paragraph/table</td></tr>
<tr valign="top" class="odd"><td >float</td><td >[ left | right | none ]</td><td >Specifies where an image or a text will be placed in another element. Note that the <code>float</code> property is only supported for tables and images.</td></tr>
<tr valign="top" class="even"><td ><code>text-transform</code></td><td >[ uppercase | lowercase ]</td><td >Select the transformation that will be performed on the text prior to displaying it.</td></tr>
<tr valign="top" class="odd"><td ><code>font-variant</code></td><td >small-caps</td><td >Perform the smallcaps transformation on the text prior to displaying it.</td></tr>
<tr valign="top" class="even"><td ><code>word-spacing</code></td><td >&lt;width&gt;px</td><td >Specifies an alternate spacing between each word.</td></tr>
</table></div>
<a name="supported-css-selectors"></a>
<h2 id="supported-css-selectors">Supported CSS Selectors</h2>
<p>All CSS 2.1 selector classes are supported except pseudo-class selectors such as <code>:first-child</code>, <code>:visited</code> and <code>:hover</code>.</p>
</div>
<!-- @@@richtext-html-subset.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="richtext-common-tasks.html">Common Rich Text Editing Tasks</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>