Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5965

qt-doc-4.8.5-10.fc18.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" />
<!-- qdeclarativetextedit.cpp -->
  <title>Qt 4.8: QML TextEdit Element</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="qdeclarativeelements.html">QML Elements</a></li>
<li>QML TextEdit Element</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">
<p class="naviNextPrevious headerNavi">
</p><p/>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signal-handlers">Signal Handlers</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QML TextEdit Element</h1>
<span class="subtitle"></span>
<!-- $$$TextEdit-brief -->
<p>The TextEdit item displays multiple lines of editable formatted text. <a href="#details">More...</a></p>
<!-- @@@TextEdit -->
<p>Inherits <a href="qml-item.html">Item</a></p>
<p>This element was introduced in Qt 4.7.</p>
<ul>
<li><a href="qml-textedit-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-textedit.html#activeFocusOnPress-prop">activeFocusOnPress</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#canPaste-prop">canPaste</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#color-prop">color</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-textedit.html#cursorDelegate-prop">cursorDelegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-textedit.html#cursorPosition-prop">cursorPosition</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-textedit.html#cursorRectangle-prop">cursorRectangle</a></b></b> : rectangle</li>
<li class="fn"><b><b><a href="qml-textedit.html#cursorVisible-prop">cursorVisible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.bold-prop">font.bold</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.capitalization-prop">font.capitalization</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.family-prop">font.family</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.italic-prop">font.italic</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.letterSpacing-prop">font.letterSpacing</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.pixelSize-prop">font.pixelSize</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.pointSize-prop">font.pointSize</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.strikeout-prop">font.strikeout</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.underline-prop">font.underline</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.weight-prop">font.weight</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-textedit.html#font.wordSpacing-prop">font.wordSpacing</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-textedit.html#horizontalAlignment-prop">horizontalAlignment</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-textedit.html#inputMethodComposing-prop">inputMethodComposing</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#lineCount-prop">lineCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-textedit.html#mouseSelectionMode-prop">mouseSelectionMode</a></b></b> : enum</li>
<li class="fn"><b><b><a href="qml-textedit.html#paintedHeight-prop">paintedHeight</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-textedit.html#paintedWidth-prop">paintedWidth</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-textedit.html#persistentSelection-prop">persistentSelection</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#readOnly-prop">readOnly</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#selectByMouse-prop">selectByMouse</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#selectedText-prop">selectedText</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-textedit.html#selectedTextColor-prop">selectedTextColor</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-textedit.html#selectionColor-prop">selectionColor</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-textedit.html#selectionStart-prop">selectionStart</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-textedit.html#smooth-prop">smooth</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-textedit.html#text-prop">text</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-textedit.html#textFormat-prop">textFormat</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-textedit.html#verticalAlignment-prop">verticalAlignment</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-textedit.html#wrapMode-prop">wrapMode</a></b></b> : enumeration</li>
</ul>
<a name="signal-handlers"></a>
<h2>Signal Handlers</h2>
<ul>
<li class="fn"><b><b><a href="qml-textedit.html#onLinkActivated-signal">onLinkActivated</a></b></b></li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-textedit.html#closeSoftwareInputPanel-method">closeSoftwareInputPanel</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#copy-method">copy</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#cut-method">cut</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#deselect-method">deselect</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#isRightToLeft-method">isRightToLeft</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#moveCursorSelection-method">moveCursorSelection</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#openSoftwareInputPanel-method">openSoftwareInputPanel</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#paste-method">paste</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#positionAt-method">positionAt</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#positionToRectangle-method">positionToRectangle</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#select-method">select</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#selectAll-method">selectAll</a></b></b></li>
<li class="fn"><b><b><a href="qml-textedit.html#selectWord-method">selectWord</a></b></b></li>
</ul>
<!-- $$$TextEdit-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>The TextEdit item displays a block of editable, formatted text.</p>
<p>It can display both plain and rich text. For example:</p>
<pre class="qml"> <span class="type">TextEdit</span> {
     <span class="name">width</span>: <span class="number">240</span>
     <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
     <span class="name">font</span>.family: <span class="string">&quot;Helvetica&quot;</span>
     <span class="name">font</span>.pointSize: <span class="number">20</span>
     <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
     <span class="name">focus</span>: <span class="number">true</span>
 }</pre>
<p class="centerAlign"><img src="images/declarative-textedit.gif" alt="" /></p><p>Setting <a href="qml-item.html#focus-prop">focus</a> to <tt>true</tt> enables the TextEdit item to receive keyboard focus.</p>
<p>Note that the TextEdit does not implement scrolling, following the cursor, or other behaviors specific to a look-and-feel. For example, to add flickable scrolling that follows the cursor:</p>
<pre class="qml"> <span class="type"><a href="qml-flickable.html">Flickable</a></span> {
     <span class="name">id</span>: <span class="name">flick</span>

     <span class="name">width</span>: <span class="number">300</span>; <span class="name">height</span>: <span class="number">200</span>;
     <span class="name">contentWidth</span>: <span class="name">edit</span>.<span class="name">paintedWidth</span>
     <span class="name">contentHeight</span>: <span class="name">edit</span>.<span class="name">paintedHeight</span>
     <span class="name">clip</span>: <span class="number">true</span>

     <span class="keyword">function</span> <span class="name">ensureVisible</span>(<span class="name">r</span>)
     {
         <span class="keyword">if</span> (<span class="name">contentX</span> <span class="operator">&gt;=</span> <span class="name">r</span>.<span class="name">x</span>)
             <span class="name">contentX</span> <span class="operator">=</span> <span class="name">r</span>.<span class="name">x</span>;
         else <span class="keyword">if</span> (<span class="name">contentX</span><span class="operator">+</span><span class="name">width</span> <span class="operator">&lt;=</span> <span class="name">r</span>.<span class="name">x</span><span class="operator">+</span><span class="name">r</span>.<span class="name">width</span>)
             <span class="name">contentX</span> <span class="operator">=</span> <span class="name">r</span>.<span class="name">x</span><span class="operator">+</span><span class="name">r</span>.<span class="name">width</span><span class="operator">-</span><span class="name">width</span>;
         <span class="keyword">if</span> (<span class="name">contentY</span> <span class="operator">&gt;=</span> <span class="name">r</span>.<span class="name">y</span>)
             <span class="name">contentY</span> <span class="operator">=</span> <span class="name">r</span>.<span class="name">y</span>;
         else <span class="keyword">if</span> (<span class="name">contentY</span><span class="operator">+</span><span class="name">height</span> <span class="operator">&lt;=</span> <span class="name">r</span>.<span class="name">y</span><span class="operator">+</span><span class="name">r</span>.<span class="name">height</span>)
             <span class="name">contentY</span> <span class="operator">=</span> <span class="name">r</span>.<span class="name">y</span><span class="operator">+</span><span class="name">r</span>.<span class="name">height</span><span class="operator">-</span><span class="name">height</span>;
     }

     <span class="type">TextEdit</span> {
         <span class="name">id</span>: <span class="name">edit</span>
         <span class="name">width</span>: <span class="name">flick</span>.<span class="name">width</span>
         <span class="name">height</span>: <span class="name">flick</span>.<span class="name">height</span>
         <span class="name">focus</span>: <span class="number">true</span>
         <span class="name">wrapMode</span>: <span class="name">TextEdit</span>.<span class="name">Wrap</span>
         <span class="name">onCursorRectangleChanged</span>: <span class="name">flick</span>.<span class="name">ensureVisible</span>(<span class="name">cursorRectangle</span>)
     }
 }</pre>
<p>A particular look-and-feel might use smooth scrolling (eg. using SmoothedFollow), might have a visible scrollbar, or a scrollbar that fades in to show location, etc.</p>
<p>Clipboard support is provided by the <a href="qml-textedit.html#cut-method">cut()</a>, <a href="qml-textedit.html#copy-method">copy()</a>, and <a href="qml-textedit.html#paste-method">paste()</a> functions, and the selection can be handled in a traditional &quot;mouse&quot; mechanism by setting <a href="qml-textedit.html#selectByMouse-prop">selectByMouse</a>, or handled completely from QML by manipulating <a href="qml-textedit.html#selectionStart-prop">selectionStart</a> and <a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a>, or using <a href="qml-textedit.html#selectAll-method">selectAll()</a> or <a href="qml-textedit.html#selectWord-method">selectWord()</a>.</p>
<p>You can translate between cursor positions (characters from the start of the document) and pixel points using <a href="qml-textedit.html#positionAt-method">positionAt()</a> and <a href="qml-textedit.html#positionToRectangle-method">positionToRectangle()</a>.</p>
<p><b>See also </b><a href="qml-text.html">Text</a>, <a href="qml-textinput.html">TextInput</a>, and <a href="declarative-text-textselection.html">Text Selection example</a>.</p>
<!-- @@@TextEdit -->
<h2>Property Documentation</h2>
<!-- $$$activeFocusOnPress -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="activeFocusOnPress-prop"></a><span class="name">activeFocusOnPress</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Whether the <a href="qml-textedit.html">TextEdit</a> should gain active focus on a mouse press. By default this is set to true.</p>
</div></div><!-- @@@activeFocusOnPress -->
<br/>
<!-- $$$canPaste -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="canPaste-prop"></a><span class="qmlreadonly">read-only</span><span class="name">canPaste</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Returns true if the <a href="qml-textedit.html">TextEdit</a> is writable and the content of the clipboard is suitable for pasting into the <a href="qml-textedit.html">TextEdit</a>.</p>
<p>This property group was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@canPaste -->
<br/>
<!-- $$$color -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="color-prop"></a><span class="name">color</span> : <span class="type"><a href="qml-color.html">color</a></span></p></td></tr></table></div><div class="qmldoc"><p>The text color.</p>
<pre class="qml"> <span class="comment">// green text using hexadecimal notation</span>
 <span class="type"><a href="qml-textedit.html">TextEdit</a></span> { <span class="name">color</span>: <span class="string">&quot;#00FF00&quot;</span> }</pre>
<pre class="qml"> <span class="comment">// steelblue text using SVG color name</span>
 <span class="type"><a href="qml-textedit.html">TextEdit</a></span> { <span class="name">color</span>: <span class="string">&quot;steelblue&quot;</span> }</pre>
</div></div><!-- @@@color -->
<br/>
<!-- $$$cursorDelegate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="cursorDelegate-prop"></a><span class="name">cursorDelegate</span> : <span class="type"><a href="qml-component.html">Component</a></span></p></td></tr></table></div><div class="qmldoc"><p>The delegate for the cursor in the <a href="qml-textedit.html">TextEdit</a>.</p>
<p>If you set a cursorDelegate for a <a href="qml-textedit.html">TextEdit</a>, this delegate will be used for drawing the cursor instead of the standard cursor. An instance of the delegate will be created and managed by the text edit when a cursor is needed, and the x and y properties of delegate instance will be set so as to be one pixel before the top left of the current character.</p>
<p>Note that the root item of the delegate component must be a <a href="qdeclarativeitem.html">QDeclarativeItem</a> or <a href="qdeclarativeitem.html">QDeclarativeItem</a> derived item.</p>
</div></div><!-- @@@cursorDelegate -->
<br/>
<!-- $$$cursorPosition -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="cursorPosition-prop"></a><span class="name">cursorPosition</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>The position of the cursor in the <a href="qml-textedit.html">TextEdit</a>.</p>
</div></div><!-- @@@cursorPosition -->
<br/>
<!-- $$$cursorRectangle -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="cursorRectangle-prop"></a><span class="qmlreadonly">read-only</span><span class="name">cursorRectangle</span> : <span class="type">rectangle</span></p></td></tr></table></div><div class="qmldoc"><p>The rectangle where the text cursor is rendered within the text edit. Read-only.</p>
</div></div><!-- @@@cursorRectangle -->
<br/>
<!-- $$$cursorVisible -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="cursorVisible-prop"></a><span class="name">cursorVisible</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>If true the text edit shows a cursor.</p>
<p>This property is set and unset when the text edit gets active focus, but it can also be set directly (useful, for example, if a KeyProxy might forward keys to it).</p>
</div></div><!-- @@@cursorVisible -->
<br/>
<!-- $$$font.bold -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.bold-prop"></a><span class="name">font.bold</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets whether the font weight is bold.</p>
</div></div><!-- @@@font.bold -->
<br/>
<!-- $$$font.capitalization -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.capitalization-prop"></a><span class="name">font.capitalization</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the capitalization for the text.</p>
<ul>
<li>Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.</li>
<li>Font.AllUppercase - This alters the text to be rendered in all uppercase type.</li>
<li>Font.AllLowercase - This alters the text to be rendered in all lowercase type.</li>
<li>Font.SmallCaps - This alters the text to be rendered in small-caps type.</li>
<li>Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.</li>
</ul>
<pre class="qml"> <span class="type"><a href="qml-textedit.html">TextEdit</a></span> { <span class="name">text</span>: <span class="string">&quot;Hello&quot;</span>; <span class="name">font</span>.capitalization: <span class="name">Font</span>.<span class="name">AllLowercase</span> }</pre>
</div></div><!-- @@@font.capitalization -->
<br/>
<!-- $$$font.family -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.family-prop"></a><span class="name">font.family</span> : <span class="type"><a href="qml-string.html">string</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the family name of the font.</p>
<p>The family name is case insensitive and may optionally include a foundry name, e.g&#x2e; &quot;Helvetica [Cronyx]&quot;. If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen. If the family isn't available a family will be set using the font matching algorithm.</p>
</div></div><!-- @@@font.family -->
<br/>
<!-- $$$font.italic -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.italic-prop"></a><span class="name">font.italic</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets whether the font has an italic style.</p>
</div></div><!-- @@@font.italic -->
<br/>
<!-- $$$font.letterSpacing -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.letterSpacing-prop"></a><span class="name">font.letterSpacing</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the letter spacing for the font.</p>
<p>Letter spacing changes the default spacing between individual letters in the font. A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.</p>
</div></div><!-- @@@font.letterSpacing -->
<br/>
<!-- $$$font.pixelSize -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.pixelSize-prop"></a><span class="name">font.pixelSize</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the font size in pixels.</p>
<p>Using this function makes the font device dependent. Use <a href="qml-textedit.html#font.pointSize-prop">TextEdit::font.pointSize</a> to set the size of the font in a device independent manner.</p>
</div></div><!-- @@@font.pixelSize -->
<br/>
<!-- $$$font.pointSize -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.pointSize-prop"></a><span class="name">font.pointSize</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the font size in points. The point size must be greater than zero.</p>
</div></div><!-- @@@font.pointSize -->
<br/>
<!-- $$$font.strikeout -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.strikeout-prop"></a><span class="name">font.strikeout</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets whether the font has a strikeout style.</p>
</div></div><!-- @@@font.strikeout -->
<br/>
<!-- $$$font.underline -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.underline-prop"></a><span class="name">font.underline</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets whether the text is underlined.</p>
</div></div><!-- @@@font.underline -->
<br/>
<!-- $$$font.weight -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.weight-prop"></a><span class="name">font.weight</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the font's weight.</p>
<p>The weight can be one of:</p>
<ul>
<li>Font.Light</li>
<li>Font.Normal - the default</li>
<li>Font.DemiBold</li>
<li>Font.Bold</li>
<li>Font.Black</li>
</ul>
<pre class="qml"> <span class="type"><a href="qml-textedit.html">TextEdit</a></span> { <span class="name">text</span>: <span class="string">&quot;Hello&quot;</span>; <span class="name">font</span>.weight: <span class="name">Font</span>.<span class="name">DemiBold</span> }</pre>
</div></div><!-- @@@font.weight -->
<br/>
<!-- $$$font.wordSpacing -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="font.wordSpacing-prop"></a><span class="name">font.wordSpacing</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the word spacing for the font.</p>
<p>Word spacing changes the default spacing between individual words. A positive value increases the word spacing by a corresponding amount of pixels, while a negative value decreases the inter-word spacing accordingly.</p>
</div></div><!-- @@@font.wordSpacing -->
<br/>
<!-- $$$horizontalAlignment -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="horizontalAlignment-prop"></a><span class="name">horizontalAlignment</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr><tr valign="top" class="even"><td class="tblQmlPropNode"><p><a name="verticalAlignment-prop"></a><span class="name">verticalAlignment</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr></table></div><div class="qmldoc"><p>Sets the horizontal and vertical alignment of the text within the <a href="qml-textedit.html">TextEdit</a> item's width and height. By default, the text alignment follows the natural alignment of the text, for example text that is read from left to right will be aligned to the left.</p>
<p>Valid values for <tt>horizontalAlignment</tt> are:</p>
<ul>
<li><a href="qml-textedit.html">TextEdit</a>.AlignLeft (default)</li>
<li><a href="qml-textedit.html">TextEdit</a>.AlignRight</li>
<li><a href="qml-textedit.html">TextEdit</a>.AlignHCenter</li>
<li><a href="qml-textedit.html">TextEdit</a>.AlignJustify</li>
</ul>
<p>Valid values for <tt>verticalAlignment</tt> are:</p>
<ul>
<li><a href="qml-textedit.html">TextEdit</a>.AlignTop (default)</li>
<li><a href="qml-textedit.html">TextEdit</a>.AlignBottom</li>
<li><a href="qml-textedit.html">TextEdit</a>.AlignVCenter</li>
</ul>
<p>When using the attached property <a href="qml-layoutmirroring.html#enabled-prop">LayoutMirroring::enabled</a> to mirror application layouts, the horizontal alignment of text will also be mirrored. However, the property <tt>horizontalAlignment</tt> will remain unchanged. To query the effective horizontal alignment of <a href="qml-textedit.html">TextEdit</a>, use the property <a href="qml-layoutmirroring.html#enabled-prop">LayoutMirroring::enabled</a>.</p>
</div></div><!-- @@@horizontalAlignment -->
<br/>
<!-- $$$inputMethodComposing -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="inputMethodComposing-prop"></a><span class="qmlreadonly">read-only</span><span class="name">inputMethodComposing</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the <a href="qml-textedit.html">TextEdit</a> has partial text input from an input method.</p>
<p>While it is composing an input method may rely on mouse or key events from the <a href="qml-textedit.html">TextEdit</a> to edit or commit the partial text. This property can be used to determine when to disable events handlers that may interfere with the correct operation of an input method.</p>
<p>This property group was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@inputMethodComposing -->
<br/>
<!-- $$$lineCount -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="lineCount-prop"></a><span class="qmlreadonly">read-only</span><span class="name">lineCount</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>Returns the total number of lines in the <a href="qtquick-whatsnew.html#textedit">textEdit</a> item.</p>
<p>This property group was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@lineCount -->
<br/>
<!-- $$$mouseSelectionMode -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="mouseSelectionMode-prop"></a><span class="name">mouseSelectionMode</span> : <span class="type">enum</span></p></td></tr></table></div><div class="qmldoc"><p>Specifies how text should be selected using a mouse.</p>
<ul>
<li><a href="qml-textedit.html">TextEdit</a>.SelectCharacters - The selection is updated with individual characters. (Default)</li>
<li><a href="qml-textedit.html">TextEdit</a>.SelectWords - The selection is updated with whole words.</li>
</ul>
<p>This property only applies when <a href="qml-textedit.html#selectByMouse-prop">selectByMouse</a> is true.</p>
<p>This property group was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@mouseSelectionMode -->
<br/>
<!-- $$$paintedHeight -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="paintedHeight-prop"></a><span class="qmlreadonly">read-only</span><span class="name">paintedHeight</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>Returns the height of the text, including the height past the height that is covered if the text does not fit within the set height.</p>
</div></div><!-- @@@paintedHeight -->
<br/>
<!-- $$$paintedWidth -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="paintedWidth-prop"></a><span class="qmlreadonly">read-only</span><span class="name">paintedWidth</span> : <span class="type"><a href="qml-real.html">real</a></span></p></td></tr></table></div><div class="qmldoc"><p>Returns the width of the text, including the width past the width which is covered due to insufficient wrapping if <a href="qml-textedit.html#wrapMode-prop">wrapMode</a> is set.</p>
</div></div><!-- @@@paintedWidth -->
<br/>
<!-- $$$persistentSelection -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="persistentSelection-prop"></a><span class="name">persistentSelection</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Whether the <a href="qml-textedit.html">TextEdit</a> should keep the selection visible when it loses active focus to another item in the scene. By default this is set to true;</p>
</div></div><!-- @@@persistentSelection -->
<br/>
<!-- $$$readOnly -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="readOnly-prop"></a><span class="name">readOnly</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Whether the user an interact with the <a href="qml-textedit.html">TextEdit</a> item. If this property is set to true the text cannot be edited by user interaction.</p>
<p>By default this property is false.</p>
</div></div><!-- @@@readOnly -->
<br/>
<!-- $$$selectByMouse -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectByMouse-prop"></a><span class="name">selectByMouse</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Defaults to false.</p>
<p>If true, the user can use the mouse to select text in some platform-specific way. Note that for some platforms this may not be an appropriate interaction (eg. may conflict with how the text needs to behave inside a Flickable.</p>
</div></div><!-- @@@selectByMouse -->
<br/>
<!-- $$$selectedText -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectedText-prop"></a><span class="qmlreadonly">read-only</span><span class="name">selectedText</span> : <span class="type"><a href="qml-string.html">string</a></span></p></td></tr></table></div><div class="qmldoc"><p>This read-only property provides the text currently selected in the text edit.</p>
<p>It is equivalent to the following snippet, but is faster and easier to use.</p>
<pre class="cpp"> <span class="comment">//myTextEdit is the id of the TextEdit</span>
 myTextEdit<span class="operator">.</span>text<span class="operator">.</span>toString()<span class="operator">.</span>substring(myTextEdit<span class="operator">.</span>selectionStart<span class="operator">,</span>
         myTextEdit<span class="operator">.</span>selectionEnd);</pre>
</div></div><!-- @@@selectedText -->
<br/>
<!-- $$$selectedTextColor -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectedTextColor-prop"></a><span class="name">selectedTextColor</span> : <span class="type"><a href="qml-textedit.html#color-prop">color</a></span></p></td></tr></table></div><div class="qmldoc"><p>The selected text color, used in selections.</p>
</div></div><!-- @@@selectedTextColor -->
<br/>
<!-- $$$selectionColor -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectionColor-prop"></a><span class="name">selectionColor</span> : <span class="type"><a href="qml-textedit.html#color-prop">color</a></span></p></td></tr></table></div><div class="qmldoc"><p>The text highlight color, used behind selections.</p>
</div></div><!-- @@@selectionColor -->
<br/>
<!-- $$$selectionEnd -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectionEnd-prop"></a><span class="qmlreadonly">read-only</span><span class="name">selectionEnd</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>The cursor position after the last character in the current selection.</p>
<p>This property is read-only. To change the selection, use select(start,end), <a href="qml-textedit.html#selectAll-method">selectAll()</a>, or <a href="qml-textedit.html#selectWord-method">selectWord()</a>.</p>
<p><b>See also </b><a href="qml-textedit.html#selectionStart-prop">selectionStart</a>, <a href="qml-textedit.html#cursorPosition-prop">cursorPosition</a>, and <a href="qml-textedit.html#selectedText-prop">selectedText</a>.</p>
</div></div><!-- @@@selectionEnd -->
<br/>
<!-- $$$selectionStart -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="selectionStart-prop"></a><span class="qmlreadonly">read-only</span><span class="name">selectionStart</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>The cursor position before the first character in the current selection.</p>
<p>This property is read-only. To change the selection, use select(start,end), <a href="qml-textedit.html#selectAll-method">selectAll()</a>, or <a href="qml-textedit.html#selectWord-method">selectWord()</a>.</p>
<p><b>See also </b><a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a>, <a href="qml-textedit.html#cursorPosition-prop">cursorPosition</a>, and <a href="qml-textedit.html#selectedText-prop">selectedText</a>.</p>
</div></div><!-- @@@selectionStart -->
<br/>
<!-- $$$smooth -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="smooth-prop"></a><span class="name">smooth</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the text is smoothly scaled or transformed.</p>
<p>Smooth filtering gives better visual quality, but is slower. If the item is displayed at its natural size, this property has no visual or performance effect.</p>
<p><b>Note:</b> Generally scaling artifacts are only visible if the item is stationary on the screen. A common pattern when animating an item is to disable smooth filtering at the beginning of the animation and reenable it at the conclusion.</p>
</div></div><!-- @@@smooth -->
<br/>
<!-- $$$text -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="text-prop"></a><span class="name">text</span> : <span class="type"><a href="qml-string.html">string</a></span></p></td></tr></table></div><div class="qmldoc"><p>The text to display. If the text format is AutoText the text edit will automatically determine whether the text should be treated as rich text. This determination is made using <a href="qt.html#mightBeRichText">Qt::mightBeRichText()</a>.</p>
</div></div><!-- @@@text -->
<br/>
<!-- $$$textFormat -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="textFormat-prop"></a><span class="name">textFormat</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr></table></div><div class="qmldoc"><p>The way the text property should be displayed.</p>
<ul>
<li><a href="qml-textedit.html">TextEdit</a>.AutoText</li>
<li><a href="qml-textedit.html">TextEdit</a>.PlainText</li>
<li><a href="qml-textedit.html">TextEdit</a>.RichText</li>
</ul>
<p>The default is <a href="qml-textedit.html">TextEdit</a>.AutoText. If the text format is <a href="qml-textedit.html">TextEdit</a>.AutoText the text edit will automatically determine whether the text should be treated as rich text. This determination is made using <a href="qt.html#mightBeRichText">Qt::mightBeRichText()</a>.</p>
<table class="generic">
<tr valign="top" class="odd"><td ><pre class="qml"> <span class="type"><a href="qml-column.html">Column</a></span> {
     <span class="type"><a href="qml-textedit.html">TextEdit</a></span> {
         <span class="name">font</span>.pointSize: <span class="number">24</span>
         <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
     }
     <span class="type"><a href="qml-textedit.html">TextEdit</a></span> {
         <span class="name">font</span>.pointSize: <span class="number">24</span>
         <span class="name">textFormat</span>: <span class="name">TextEdit</span>.<span class="name">RichText</span>
         <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
     }
     <span class="type"><a href="qml-textedit.html">TextEdit</a></span> {
         <span class="name">font</span>.pointSize: <span class="number">24</span>
         <span class="name">textFormat</span>: <span class="name">TextEdit</span>.<span class="name">PlainText</span>
         <span class="name">text</span>: <span class="string">&quot;&lt;b&gt;Hello&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt;&quot;</span>
     }
 }</pre>
</td><td ><p class="centerAlign"><img src="images/declarative-textformat.png" alt="" /></p></td></tr>
</table>
</div></div><!-- @@@textFormat -->
<br/>
<!-- $$$wrapMode -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="even"><td class="tblQmlPropNode"><p><a name="wrapMode-prop"></a><span class="name">wrapMode</span> : <span class="type"><a href="qml-enumeration.html">enumeration</a></span></p></td></tr></table></div><div class="qmldoc"><p>Set this property to wrap the text to the <a href="qml-textedit.html">TextEdit</a> item's width. The text will only wrap if an explicit width has been set.</p>
<ul>
<li><a href="qml-textedit.html">TextEdit</a>.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width.</li>
<li><a href="qml-textedit.html">TextEdit</a>.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width.</li>
<li><a href="qml-textedit.html">TextEdit</a>.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word.</li>
<li><a href="qml-textedit.html">TextEdit</a>.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.</li>
</ul>
<p>The default is <a href="qml-textedit.html">TextEdit</a>.NoWrap. If you set a width, consider using <a href="qml-textedit.html">TextEdit</a>.Wrap.</p>
</div></div><!-- @@@wrapMode -->
<br/>
<h2>Signal Handler Documentation</h2>
<!-- $$$onLinkActivated -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onLinkActivated-signal"></a>TextEdit::<span class="name">onLinkActivated</span> ( <span class="type"><a href="qml-string.html">string</a></span> <i>link</i> )</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the user clicks on a link embedded in the text. The link must be in rich text or HTML format and the <i>link</i> string provides access to the particular link.</p>
<p>This documentation was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@onLinkActivated -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$closeSoftwareInputPanel -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="closeSoftwareInputPanel-method"></a><span class="type">void</span> TextEdit::<span class="name">closeSoftwareInputPanel</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Closes a software input panel like a virtual keyboard shown on the screen, useful for customizing when you want the input keyboard to be shown and hidden in your application.</p>
<p>By default the opening of input panels follows the platform style. On Symbian^1 and Symbian^3 -based devices the panels are opened by clicking <a href="qml-textedit.html">TextEdit</a>. On other platforms the panels are automatically opened when <a href="qml-textedit.html">TextEdit</a> element gains active focus. Input panels are always closed if no editor has active focus.</p>
<p>You can disable the automatic behavior by setting the property <tt>activeFocusOnPress</tt> to false and use functions <a href="qml-textedit.html#openSoftwareInputPanel-method">openSoftwareInputPanel()</a> and closeSoftwareInputPanel() to implement the behavior you want.</p>
<p>Only relevant on platforms, which provide virtual keyboards.</p>
<pre class="cpp"> import <span class="type">QtQuick</span> <span class="number">1.0</span>
 TextEdit {
     id: textEdit
     text: <span class="string">&quot;Hello world!&quot;</span>
     activeFocusOnPress: <span class="keyword">false</span>
     MouseArea {
         anchors<span class="operator">.</span>fill: parent
         onClicked: {
             <span class="keyword">if</span> (<span class="operator">!</span>textEdit<span class="operator">.</span>activeFocus) {
                 textEdit<span class="operator">.</span>forceActiveFocus();
                 textEdit<span class="operator">.</span>openSoftwareInputPanel();
             } <span class="keyword">else</span> {
                 textEdit<span class="operator">.</span>focus <span class="operator">=</span> <span class="keyword">false</span>;
             }
         }
         onPressAndHold: textEdit<span class="operator">.</span>closeSoftwareInputPanel();
     }
 }</pre>
</div></div><!-- @@@closeSoftwareInputPanel -->
<br/>
<!-- $$$copy -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="copy-method"></a>TextEdit::<span class="name">copy</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Copies the currently selected text to the system clipboard.</p>
</div></div><!-- @@@copy -->
<br/>
<!-- $$$cut -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="cut-method"></a>TextEdit::<span class="name">cut</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Moves the currently selected text to the system clipboard.</p>
</div></div><!-- @@@cut -->
<br/>
<!-- $$$deselect -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="deselect-method"></a><span class="type">void</span> TextEdit::<span class="name">deselect</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Removes active text selection.</p>
<p>This documentation was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@deselect -->
<br/>
<!-- $$$isRightToLeft -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="isRightToLeft-method"></a><span class="type">void</span> TextEdit::<span class="name">isRightToLeft</span> ( <span class="type"><a href="qml-int.html">int</a></span> <i>start</i>, <span class="type"><a href="qml-int.html">int</a></span> <i>end</i> )</p></td></tr></table></div><div class="qmldoc"><p>Returns true if the natural reading direction of the editor text found between positions <i>start</i> and <i>end</i> is right to left.</p>
</div></div><!-- @@@isRightToLeft -->
<br/>
<!-- $$$moveCursorSelection -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="moveCursorSelection-method"></a><span class="type">void</span> TextEdit::<span class="name">moveCursorSelection</span> ( <span class="type"><a href="qml-int.html">int</a></span> <i>position</i>, <span class="type">SelectionMode</span> <i>mode</i> = TextEdit.SelectCharacters )</p></td></tr></table></div><div class="qmldoc"><p>Moves the cursor to <i>position</i> and updates the selection according to the optional <i>mode</i> parameter. (To only move the cursor, set the <a href="qml-textedit.html#cursorPosition-prop">cursorPosition</a> property.)</p>
<p>When this method is called it additionally sets either the <a href="qml-textedit.html#selectionStart-prop">selectionStart</a> or the <a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a> (whichever was at the previous cursor position) to the specified position. This allows you to easily extend and contract the selected text range.</p>
<p>The selection mode specifies whether the selection is updated on a per character or a per word basis. If not specified the selection mode will default to <a href="qml-textedit.html">TextEdit</a>.SelectCharacters.</p>
<ul>
<li><a href="qml-textedit.html">TextEdit</a>.SelectCharacters - Sets either the <a href="qml-textedit.html#selectionStart-prop">selectionStart</a> or <a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a> (whichever was at the previous cursor position) to the specified position.</li>
<li><a href="qml-textedit.html">TextEdit</a>.SelectWords - Sets the <a href="qml-textedit.html#selectionStart-prop">selectionStart</a> and <a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a> to include all words between the specified postion and the previous cursor position. Words partially in the range are included.</li>
</ul>
<p>For example, take this sequence of calls:</p>
<pre class="cpp"> cursorPosition <span class="operator">=</span> <span class="number">5</span>
 moveCursorSelection(<span class="number">9</span><span class="operator">,</span> TextEdit<span class="operator">.</span>SelectCharacters)
 moveCursorSelection(<span class="number">7</span><span class="operator">,</span> TextEdit<span class="operator">.</span>SelectCharacters)</pre>
<p>This moves the cursor to position 5, extend the selection end from 5 to 9 and then retract the selection end from 9 to 7, leaving the text from position 5 to 7 selected (the 6th and 7th characters).</p>
<p>The same sequence with <a href="qml-textedit.html">TextEdit</a>.SelectWords will extend the selection start to a word boundary before or on position 5 and extend the selection end to a word boundary on or past position 9.</p>
<p>This documentation was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@moveCursorSelection -->
<br/>
<!-- $$$openSoftwareInputPanel -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="openSoftwareInputPanel-method"></a><span class="type">void</span> TextEdit::<span class="name">openSoftwareInputPanel</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Opens software input panels like virtual keyboards for typing, useful for customizing when you want the input keyboard to be shown and hidden in your application.</p>
<p>By default the opening of input panels follows the platform style. On Symbian^1 and Symbian^3 -based devices the panels are opened by clicking <a href="qml-textedit.html">TextEdit</a>. On other platforms the panels are automatically opened when <a href="qml-textedit.html">TextEdit</a> element gains active focus. Input panels are always closed if no editor has active focus.</p>
<p>You can disable the automatic behavior by setting the property <tt>activeFocusOnPress</tt> to false and use functions openSoftwareInputPanel() and <a href="qml-textedit.html#closeSoftwareInputPanel-method">closeSoftwareInputPanel()</a> to implement the behavior you want.</p>
<p>Only relevant on platforms, which provide virtual keyboards.</p>
<pre class="cpp"> import <span class="type">QtQuick</span> <span class="number">1.0</span>
 TextEdit {
     id: textEdit
     text: <span class="string">&quot;Hello world!&quot;</span>
     activeFocusOnPress: <span class="keyword">false</span>
     MouseArea {
         anchors<span class="operator">.</span>fill: parent
         onClicked: {
             <span class="keyword">if</span> (<span class="operator">!</span>textEdit<span class="operator">.</span>activeFocus) {
                 textEdit<span class="operator">.</span>forceActiveFocus();
                 textEdit<span class="operator">.</span>openSoftwareInputPanel();
             } <span class="keyword">else</span> {
                 textEdit<span class="operator">.</span>focus <span class="operator">=</span> <span class="keyword">false</span>;
             }
         }
         onPressAndHold: textEdit<span class="operator">.</span>closeSoftwareInputPanel();
     }
 }</pre>
</div></div><!-- @@@openSoftwareInputPanel -->
<br/>
<!-- $$$paste -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="paste-method"></a>TextEdit::<span class="name">paste</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Replaces the currently selected text by the contents of the system clipboard.</p>
</div></div><!-- @@@paste -->
<br/>
<!-- $$$positionAt -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="positionAt-method"></a><span class="type"><a href="qml-int.html">int</a></span> TextEdit::<span class="name">positionAt</span> ( <span class="type"><a href="qml-int.html">int</a></span> <i>x</i>, <span class="type"><a href="qml-int.html">int</a></span> <i>y</i> )</p></td></tr></table></div><div class="qmldoc"><p>Returns the text position closest to pixel position (<i>x</i>, <i>y</i>).</p>
<p>Position 0 is before the first character, position 1 is after the first character but before the second, and so on until position <a href="qml-textedit.html#text-prop">text</a>.length, which is after all characters.</p>
</div></div><!-- @@@positionAt -->
<br/>
<!-- $$$positionToRectangle -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="positionToRectangle-method"></a><span class="type">rectangle</span> TextEdit::<span class="name">positionToRectangle</span> ( <span class="type">position</span> )</p></td></tr></table></div><div class="qmldoc"><p>Returns the rectangle at the given <i>position</i> in the text. The x, y, and height properties correspond to the cursor that would describe that position.</p>
</div></div><!-- @@@positionToRectangle -->
<br/>
<!-- $$$select -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="select-method"></a><span class="type">void</span> TextEdit::<span class="name">select</span> ( <span class="type"><a href="qml-int.html">int</a></span> <i>start</i>, <span class="type"><a href="qml-int.html">int</a></span> <i>end</i> )</p></td></tr></table></div><div class="qmldoc"><p>Causes the text from <i>start</i> to <i>end</i> to be selected.</p>
<p>If either start or end is out of range, the selection is not changed.</p>
<p>After calling this, <a href="qml-textedit.html#selectionStart-prop">selectionStart</a> will become the lesser and <a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a> will become the greater (regardless of the order passed to this method).</p>
<p><b>See also </b><a href="qml-textedit.html#selectionStart-prop">selectionStart</a> and <a href="qml-textedit.html#selectionEnd-prop">selectionEnd</a>.</p>
</div></div><!-- @@@select -->
<br/>
<!-- $$$selectAll -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="selectAll-method"></a><span class="type">void</span> TextEdit::<span class="name">selectAll</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Causes all text to be selected.</p>
</div></div><!-- @@@selectAll -->
<br/>
<!-- $$$selectWord -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="selectWord-method"></a><span class="type">void</span> TextEdit::<span class="name">selectWord</span> ()</p></td></tr></table></div><div class="qmldoc"><p>Causes the word closest to the current cursor position to be selected.</p>
</div></div><!-- @@@selectWord -->
<br/>
<p class="naviNextPrevious footerNavi">
</p>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. 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>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      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>