Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4661

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3simplerichtext.cpp -->
  <title>Qt 4.8: Q3SimpleRichText Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3SimpleRichText</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3SimpleRichText Class Reference</h1>
<!-- $$$Q3SimpleRichText-brief -->
<p>The Q3SimpleRichText class provides a small displayable piece of rich text. <a href="#details">More...</a></p>
<!-- @@@Q3SimpleRichText -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3SimpleRichText&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qsimplerichtext">Porting to Qt 4</a> for more information.</p>
<ul>
<li><a href="q3simplerichtext-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#Q3SimpleRichText">Q3SimpleRichText</a></b> ( const QString &amp; <i>text</i>, const QFont &amp; <i>fnt</i>, const QString &amp; <i>context</i> = QString(), const Q3StyleSheet * <i>sheet</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#Q3SimpleRichText-2">Q3SimpleRichText</a></b> ( const QString &amp; <i>text</i>, const QFont &amp; <i>fnt</i>, const QString &amp; <i>context</i>, const Q3StyleSheet * <i>sheet</i>, const Q3MimeSourceFactory * <i>factory</i>, int <i>pageBreak</i> = -1, const QColor &amp; <i>linkColor</i> = Qt::blue, bool <i>linkUnderline</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#dtor.Q3SimpleRichText">~Q3SimpleRichText</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#adjustSize">adjustSize</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#anchorAt">anchorAt</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#context">context</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#draw">draw</a></b> ( QPainter * <i>p</i>, int <i>x</i>, int <i>y</i>, const QRect &amp; <i>clipRect</i>, const QColorGroup &amp; <i>cg</i>, const QBrush * <i>paper</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#draw-2">draw</a></b> ( QPainter * <i>p</i>, int <i>x</i>, int <i>y</i>, const QRegion &amp; <i>clipRegion</i>, const QColorGroup &amp; <i>cg</i>, const QBrush * <i>paper</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#height">height</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#inText">inText</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#setDefaultFont">setDefaultFont</a></b> ( const QFont &amp; <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#setWidth">setWidth</a></b> ( QPainter * <i>p</i>, int <i>w</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#setWidth-2">setWidth</a></b> ( int <i>w</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#width">width</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3simplerichtext.html#widthUsed">widthUsed</a></b> () const</td></tr>
</table>
<a name="details"></a>
<!-- $$$Q3SimpleRichText-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3SimpleRichText class provides a small displayable piece of rich text.</p>
<p>This class encapsulates simple rich text usage in which a string is interpreted as rich text and can be drawn. This is particularly useful if you want to display some rich text in a custom widget. A <a href="q3stylesheet.html">Q3StyleSheet</a> is needed to interpret the tags and format the rich text. Qt provides a default HTML-like style sheet, but you may define custom style sheets.</p>
<p>Once created, the rich text object can be queried for its <a href="q3simplerichtext.html#width">width</a>(), <a href="q3simplerichtext.html#height">height</a>(), and the actual width used (see <a href="q3simplerichtext.html#widthUsed">widthUsed</a>()). Most importantly, it can be drawn on any given <a href="qpainter.html">QPainter</a> with <a href="q3simplerichtext.html#draw">draw</a>(). Q3SimpleRichText can also be used to implement hypertext or active text facilities by using <a href="q3simplerichtext.html#anchorAt">anchorAt</a>(). A hit test through <a href="q3simplerichtext.html#inText">inText</a>() makes it possible to use simple rich text for text objects in editable drawing canvases.</p>
<p>Once constructed from a string the contents cannot be changed, only resized. If the contents change, just throw the rich text object away and make a new one with the new contents.</p>
<p>For large documents use <a href="qtextedit.html">QTextEdit</a> or <a href="qtextbrowser.html">QTextBrowser</a>. For very small items of rich text you can use a <a href="qlabel.html">QLabel</a>.</p>
<p>If you are using Q3SimpleRichText to print in high resolution you should call setWidth(<a href="qpainter.html">QPainter</a>, int) so that the content will be laid out properly on the page.</p>
</div>
<!-- @@@Q3SimpleRichText -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3SimpleRichText[overload1]$$$Q3SimpleRichTextconstQString&constQFont&constQString&constQ3StyleSheet* -->
<h3 class="fn"><a name="Q3SimpleRichText"></a>Q3SimpleRichText::<span class="name">Q3SimpleRichText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>fnt</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>context</i> = QString(), const <span class="type"><a href="q3stylesheet.html">Q3StyleSheet</a></span> * <i>sheet</i> = 0 )</h3>
<p>Constructs a <a href="q3simplerichtext.html" class="compat">Q3SimpleRichText</a> from the rich text string <i>text</i> and the font <i>fnt</i>.</p>
<p>The font is used as a basis for the text rendering. When using rich text rendering on a widget <i>w</i>, you would normally specify the widget's font, for example:</p>
<pre class="cpp"> <span class="type"><a href="q3simplerichtext.html">Q3SimpleRichText</a></span> myrichtext(contents<span class="operator">,</span> mywidget<span class="operator">-</span><span class="operator">&gt;</span>font());</pre>
<p><i>context</i> is the optional context of the rich text object. This becomes important if <i>text</i> contains relative references, for example within image tags. <a href="q3simplerichtext.html" class="compat">Q3SimpleRichText</a> always uses the default mime source factory (see <a href="q3mimesourcefactory.html#defaultFactory">Q3MimeSourceFactory::defaultFactory</a>()) to resolve those references. The context will then be used to calculate the absolute path. See <a href="q3mimesourcefactory.html#makeAbsolute">Q3MimeSourceFactory::makeAbsolute</a>() for details.</p>
<p>The <i>sheet</i> is an optional style sheet. If it is 0, the default style sheet will be used (see <a href="q3stylesheet.html#defaultSheet">Q3StyleSheet::defaultSheet</a>()).</p>
<!-- @@@Q3SimpleRichText -->
<!-- $$$Q3SimpleRichText$$$Q3SimpleRichTextconstQString&constQFont&constQString&constQ3StyleSheet*constQ3MimeSourceFactory*intconstQColor&bool -->
<h3 class="fn"><a name="Q3SimpleRichText-2"></a>Q3SimpleRichText::<span class="name">Q3SimpleRichText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>fnt</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>context</i>, const <span class="type"><a href="q3stylesheet.html">Q3StyleSheet</a></span> * <i>sheet</i>, const <span class="type"><a href="q3mimesourcefactory.html">Q3MimeSourceFactory</a></span> * <i>factory</i>, <span class="type">int</span> <i>pageBreak</i> = -1, const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>linkColor</i> = Qt::blue, <span class="type">bool</span> <i>linkUnderline</i> = true )</h3>
<p>Constructs a <a href="q3simplerichtext.html" class="compat">Q3SimpleRichText</a> from the rich text string <i>text</i> and the font <i>fnt</i>.</p>
<p>This is a slightly more complex constructor for <a href="q3simplerichtext.html" class="compat">Q3SimpleRichText</a> that takes an additional mime source factory <i>factory</i>, a page break parameter <i>pageBreak</i> and a bool <i>linkUnderline</i>. <i>linkColor</i> is only provided for compatibility, but has no effect, as <a href="qpalette.html#link">QPalette::link</a>() color is used now.</p>
<p><i>context</i> is the optional context of the rich text object. This becomes important if <i>text</i> contains relative references, for example within image tags. <a href="q3simplerichtext.html" class="compat">Q3SimpleRichText</a> always uses the default mime source factory (see <a href="q3mimesourcefactory.html#defaultFactory">Q3MimeSourceFactory::defaultFactory</a>()) to resolve those references. The context will then be used to calculate the absolute path. See <a href="q3mimesourcefactory.html#makeAbsolute">Q3MimeSourceFactory::makeAbsolute</a>() for details.</p>
<p>The <i>sheet</i> is an optional style sheet. If it is 0, the default style sheet will be used (see <a href="q3stylesheet.html#defaultSheet">Q3StyleSheet::defaultSheet</a>()).</p>
<p>This constructor is useful for creating a <a href="q3simplerichtext.html" class="compat">Q3SimpleRichText</a> object suitable for printing. Set <i>pageBreak</i> to be the height of the contents area of the pages.</p>
<!-- @@@Q3SimpleRichText -->
<!-- $$$~Q3SimpleRichText[overload1]$$$~Q3SimpleRichText -->
<h3 class="fn"><a name="dtor.Q3SimpleRichText"></a>Q3SimpleRichText::<span class="name">~Q3SimpleRichText</span> ()</h3>
<p>Destroys the rich text object, freeing memory.</p>
<!-- @@@~Q3SimpleRichText -->
<!-- $$$adjustSize[overload1]$$$adjustSize -->
<h3 class="fn"><a name="adjustSize"></a><span class="type">void</span> Q3SimpleRichText::<span class="name">adjustSize</span> ()</h3>
<p>Adjusts the rich text object to a reasonable size.</p>
<p><b>See also </b><a href="q3simplerichtext.html#setWidth">setWidth</a>().</p>
<!-- @@@adjustSize -->
<!-- $$$anchorAt[overload1]$$$anchorAtconstQPoint& -->
<h3 class="fn"><a name="anchorAt"></a><span class="type"><a href="qstring.html">QString</a></span> Q3SimpleRichText::<span class="name">anchorAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> ) const</h3>
<p>Returns the anchor at the requested position, <i>pos</i>. An empty string is returned if no anchor is specified for this position.</p>
<!-- @@@anchorAt -->
<!-- $$$context[overload1]$$$context -->
<h3 class="fn"><a name="context"></a><span class="type"><a href="qstring.html">QString</a></span> Q3SimpleRichText::<span class="name">context</span> () const</h3>
<p>Returns the context of the rich text object. If no context has been specified in the constructor, an empty string is returned. The context is the path to use to look up relative links, such as image tags and anchor references.</p>
<!-- @@@context -->
<!-- $$$draw[overload1]$$$drawQPainter*intintconstQRect&constQColorGroup&constQBrush* -->
<h3 class="fn"><a name="draw"></a><span class="type">void</span> Q3SimpleRichText::<span class="name">draw</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>clipRect</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i>, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>paper</i> = 0 ) const</h3>
<p>Draws the formatted text with painter <i>p</i>, at position (<i>x</i>, <i>y</i>), clipped to <i>clipRect</i>. The clipping rectangle is given in the rich text object's coordinates translated by (<i>x</i>, <i>y</i>). Passing an null rectangle results in no clipping. Colors from the color group <i>cg</i> are used as needed, and if not 0, *<i>paper</i> is used as the background brush.</p>
<p>Note that the display code is highly optimized to reduce flicker, so passing a brush for <i>paper</i> is preferable to simply clearing the area to be painted and then calling this without a brush.</p>
<!-- @@@draw -->
<!-- $$$draw$$$drawQPainter*intintconstQRegion&constQColorGroup&constQBrush* -->
<h3 class="fn"><a name="draw-2"></a><span class="type">void</span> Q3SimpleRichText::<span class="name">draw</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i>, const <span class="type"><a href="qregion.html">QRegion</a></span> &amp; <i>clipRegion</i>, const <span class="type"><a href="qcolorgroup.html">QColorGroup</a></span> &amp; <i>cg</i>, const <span class="type"><a href="qbrush.html">QBrush</a></span> * <i>paper</i> = 0 ) const</h3>
<p>Use the version with clipRect instead of this <i>clipRegion</i> version, since this region version has problems with larger documents on some platforms (on X11 regions internally are represented with 16-bit coordinates).</p>
<!-- @@@draw -->
<!-- $$$height[overload1]$$$height -->
<h3 class="fn"><a name="height"></a><span class="type">int</span> Q3SimpleRichText::<span class="name">height</span> () const</h3>
<p>Returns the height of the rich text object in pixels.</p>
<p><b>See also </b><a href="q3simplerichtext.html#setWidth">setWidth</a>().</p>
<!-- @@@height -->
<!-- $$$inText[overload1]$$$inTextconstQPoint& -->
<h3 class="fn"><a name="inText"></a><span class="type">bool</span> Q3SimpleRichText::<span class="name">inText</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> ) const</h3>
<p>Returns true if <i>pos</i> is within a text line of the rich text object; otherwise returns false.</p>
<!-- @@@inText -->
<!-- $$$setDefaultFont[overload1]$$$setDefaultFontconstQFont& -->
<h3 class="fn"><a name="setDefaultFont"></a><span class="type">void</span> Q3SimpleRichText::<span class="name">setDefaultFont</span> ( const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>f</i> )</h3>
<p>Sets the default font for the rich text object to <i>f</i></p>
<!-- @@@setDefaultFont -->
<!-- $$$setWidth[overload1]$$$setWidthQPainter*int -->
<h3 class="fn"><a name="setWidth"></a><span class="type">void</span> Q3SimpleRichText::<span class="name">setWidth</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>w</i> )</h3>
<p>Sets the width of the rich text object to <i>w</i> pixels, recalculating the layout as if it were to be drawn with painter <i>p</i>.</p>
<p>Passing a painter is useful when you intend drawing on devices other than the screen, for example a <a href="qprinter.html">QPrinter</a>.</p>
<p><b>See also </b><a href="q3simplerichtext.html#width">width</a>(), <a href="q3simplerichtext.html#height">height</a>(), and <a href="q3simplerichtext.html#adjustSize">adjustSize</a>().</p>
<!-- @@@setWidth -->
<!-- $$$setWidth$$$setWidthint -->
<h3 class="fn"><a name="setWidth-2"></a><span class="type">void</span> Q3SimpleRichText::<span class="name">setWidth</span> ( <span class="type">int</span> <i>w</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the width of the rich text object to <i>w</i> pixels.</p>
<p><b>See also </b><a href="q3simplerichtext.html#height">height</a>() and <a href="q3simplerichtext.html#adjustSize">adjustSize</a>().</p>
<!-- @@@setWidth -->
<!-- $$$width[overload1]$$$width -->
<h3 class="fn"><a name="width"></a><span class="type">int</span> Q3SimpleRichText::<span class="name">width</span> () const</h3>
<p>Returns the set width of the rich text object in pixels.</p>
<p><b>See also </b><a href="q3simplerichtext.html#setWidth">setWidth</a>() and <a href="q3simplerichtext.html#widthUsed">widthUsed</a>().</p>
<!-- @@@width -->
<!-- $$$widthUsed[overload1]$$$widthUsed -->
<h3 class="fn"><a name="widthUsed"></a><span class="type">int</span> Q3SimpleRichText::<span class="name">widthUsed</span> () const</h3>
<p>Returns the width in pixels that is actually used by the rich text object. This can be smaller or wider than the set width.</p>
<p>It may be wider, for example, if the text contains images or non-breakable words that are already wider than the available space. It's smaller when the object only consists of lines that do not fill the width completely.</p>
<p><b>See also </b><a href="q3simplerichtext.html#width">width</a>().</p>
<!-- @@@widthUsed -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>