Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6151

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" />
<!-- qplaintextedit.cpp -->
  <title>Qt 4.8: QPlainTextEdit 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><a href="qtgui.html">QtGui</a></li>
<li>QPlainTextEdit</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-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#introduction-and-concepts">Introduction and Concepts</a></li>
<li class="level2"><a href="#using-qplaintextedit-as-a-display-widget">Using QPlainTextEdit as a Display Widget</a></li>
<li class="level3"><a href="#read-only-key-bindings">Read-only Key Bindings</a></li>
<li class="level2"><a href="#using-qplaintextedit-as-an-editor">Using QPlainTextEdit as an Editor</a></li>
<li class="level3"><a href="#syntax-highlighting">Syntax Highlighting</a></li>
<li class="level3"><a href="#editing-key-bindings">Editing Key Bindings</a></li>
<li class="level2"><a href="#differences-to-qtextedit">Differences to QTextEdit</a></li>
</ul>
</div>
<h1 class="title">QPlainTextEdit Class Reference</h1>
<!-- $$$QPlainTextEdit-brief -->
<p>The QPlainTextEdit class provides a widget that is used to edit and display plain text. <a href="#details">More...</a></p>
<!-- @@@QPlainTextEdit -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QPlainTextEdit&gt;</span></pre><p><b>Inherits: </b><a href="qabstractscrollarea.html">QAbstractScrollArea</a>.</p>
<p>This class was introduced in Qt 4.4.</p>
<ul>
<li><a href="qplaintextedit-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#LineWrapMode-enum">LineWrapMode</a></b> { NoWrap, WidgetWidth }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qplaintextedit.html#backgroundVisible-prop">backgroundVisible</a></b> : bool</li>
<li class="fn"><b><a href="qplaintextedit.html#blockCount-prop">blockCount</a></b> : const int</li>
<li class="fn"><b><a href="qplaintextedit.html#centerOnScroll-prop">centerOnScroll</a></b> : bool</li>
<li class="fn"><b><a href="qplaintextedit.html#cursorWidth-prop">cursorWidth</a></b> : int</li>
<li class="fn"><b><a href="qplaintextedit.html#documentTitle-prop">documentTitle</a></b> : QString</li>
<li class="fn"><b><a href="qplaintextedit.html#lineWrapMode-prop">lineWrapMode</a></b> : LineWrapMode</li>
<li class="fn"><b><a href="qplaintextedit.html#maximumBlockCount-prop">maximumBlockCount</a></b> : int</li>
<li class="fn"><b><a href="qplaintextedit.html#overwriteMode-prop">overwriteMode</a></b> : bool</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qplaintextedit.html#plainText-prop">plainText</a></b> : QString</li>
<li class="fn"><b><a href="qplaintextedit.html#readOnly-prop">readOnly</a></b> : bool</li>
<li class="fn"><b><a href="qplaintextedit.html#tabChangesFocus-prop">tabChangesFocus</a></b> : bool</li>
<li class="fn"><b><a href="qplaintextedit.html#tabStopWidth-prop">tabStopWidth</a></b> : int</li>
<li class="fn"><b><a href="qplaintextedit.html#textInteractionFlags-prop">textInteractionFlags</a></b> : Qt::TextInteractionFlags</li>
<li class="fn"><b><a href="qplaintextedit.html#undoRedoEnabled-prop">undoRedoEnabled</a></b> : bool</li>
<li class="fn"><b><a href="qplaintextedit.html#wordWrapMode-prop">wordWrapMode</a></b> : QTextOption::WrapMode</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</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="qplaintextedit.html#QPlainTextEdit">QPlainTextEdit</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#QPlainTextEdit-2">QPlainTextEdit</a></b> ( const QString &amp; <i>text</i>, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#dtor.QPlainTextEdit">~QPlainTextEdit</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#anchorAt">anchorAt</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#backgroundVisible-prop">backgroundVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#blockCount-prop">blockCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#canPaste">canPaste</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#centerOnScroll-prop">centerOnScroll</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenu * </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#createStandardContextMenu">createStandardContextMenu</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#currentCharFormat">currentCharFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCursor </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cursorForPosition">cursorForPosition</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cursorRect">cursorRect</a></b> ( const QTextCursor &amp; <i>cursor</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cursorRect-2">cursorRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cursorWidth-prop">cursorWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextDocument * </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#document">document</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#documentTitle-prop">documentTitle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#ensureCursorVisible">ensureCursorVisible</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTextEdit::ExtraSelection&gt; </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#extraSelections">extraSelections</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#find">find</a></b> ( const QString &amp; <i>exp</i>, QTextDocument::FindFlags <i>options</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#readOnly-prop">isReadOnly</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#undoRedoEnabled-prop">isUndoRedoEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> LineWrapMode </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#lineWrapMode-prop">lineWrapMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#loadResource">loadResource</a></b> ( int <i>type</i>, const QUrl &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#maximumBlockCount-prop">maximumBlockCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#mergeCurrentCharFormat">mergeCurrentCharFormat</a></b> ( const QTextCharFormat &amp; <i>modifier</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#moveCursor">moveCursor</a></b> ( QTextCursor::MoveOperation <i>operation</i>, QTextCursor::MoveMode <i>mode</i> = QTextCursor::MoveAnchor )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#overwriteMode-prop">overwriteMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#print">print</a></b> ( QPrinter * <i>printer</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#backgroundVisible-prop">setBackgroundVisible</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#centerOnScroll-prop">setCenterOnScroll</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#setCurrentCharFormat">setCurrentCharFormat</a></b> ( const QTextCharFormat &amp; <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cursorWidth-prop">setCursorWidth</a></b> ( int <i>width</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#setDocument">setDocument</a></b> ( QTextDocument * <i>document</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#documentTitle-prop">setDocumentTitle</a></b> ( const QString &amp; <i>title</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#setExtraSelections">setExtraSelections</a></b> ( const QList&lt;QTextEdit::ExtraSelection&gt; &amp; <i>selections</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#lineWrapMode-prop">setLineWrapMode</a></b> ( LineWrapMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#maximumBlockCount-prop">setMaximumBlockCount</a></b> ( int <i>maximum</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#overwriteMode-prop">setOverwriteMode</a></b> ( bool <i>overwrite</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#readOnly-prop">setReadOnly</a></b> ( bool <i>ro</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#tabChangesFocus-prop">setTabChangesFocus</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#tabStopWidth-prop">setTabStopWidth</a></b> ( int <i>width</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#setTextCursor">setTextCursor</a></b> ( const QTextCursor &amp; <i>cursor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#textInteractionFlags-prop">setTextInteractionFlags</a></b> ( Qt::TextInteractionFlags <i>flags</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#undoRedoEnabled-prop">setUndoRedoEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#wordWrapMode-prop">setWordWrapMode</a></b> ( QTextOption::WrapMode <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#tabChangesFocus-prop">tabChangesFocus</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#tabStopWidth-prop">tabStopWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCursor </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#textCursor">textCursor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextInteractionFlags </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#textInteractionFlags-prop">textInteractionFlags</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#plainText-prop">toPlainText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextOption::WrapMode </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#wordWrapMode-prop">wordWrapMode</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">17 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#appendHtml">appendHtml</a></b> ( const QString &amp; <i>html</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#appendPlainText">appendPlainText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#centerCursor">centerCursor</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#copy">copy</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cut">cut</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#insertPlainText">insertPlainText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#paste">paste</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#redo">redo</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#selectAll">selectAll</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#plainText-prop">setPlainText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#undo">undo</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#blockCountChanged">blockCountChanged</a></b> ( int <i>newBlockCount</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#copyAvailable">copyAvailable</a></b> ( bool <i>yes</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#cursorPositionChanged">cursorPositionChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#modificationChanged">modificationChanged</a></b> ( bool <i>changed</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#redoAvailable">redoAvailable</a></b> ( bool <i>available</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#selectionChanged">selectionChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#textChanged">textChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#undoAvailable">undoAvailable</a></b> ( bool <i>available</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#updateRequest">updateRequest</a></b> ( const QRect &amp; <i>rect</i>, int <i>dy</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#blockBoundingGeometry">blockBoundingGeometry</a></b> ( const QTextBlock &amp; <i>block</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#blockBoundingRect">blockBoundingRect</a></b> ( const QTextBlock &amp; <i>block</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#canInsertFromMimeData">canInsertFromMimeData</a></b> ( const QMimeData * <i>source</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#contentOffset">contentOffset</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMimeData * </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#createMimeDataFromSelection">createMimeDataFromSelection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextBlock </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#firstVisibleBlock">firstVisibleBlock</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractTextDocumentLayout::PaintContext </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#getPaintContext">getPaintContext</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#insertFromMimeData">insertFromMimeData</a></b> ( const QMimeData * <i>source</i> )</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#contextMenuEvent">contextMenuEvent</a></b> ( QContextMenuEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#dragEnterEvent">dragEnterEvent</a></b> ( QDragEnterEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>property</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#scrollContentsBy">scrollContentsBy</a></b> ( int <i>dx</i>, int <i>dy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#showEvent">showEvent</a></b> ( QShowEvent * )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qplaintextedit.html#wheelEvent">wheelEvent</a></b> ( QWheelEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">18 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qabstractscrollarea.html#protected-slots">QAbstractScrollArea</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QPlainTextEdit-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QPlainTextEdit class provides a widget that is used to edit and display plain text.</p>
<a name="introduction-and-concepts"></a>
<h3>Introduction and Concepts</h3>
<p>QPlainTextEdit is an advanced viewer/editor supporting plain text. It is optimized to handle large documents and to respond quickly to user input.</p>
<p>QPlainText uses very much the same technology and concepts as <a href="qtextedit.html">QTextEdit</a>, but is optimized for plain text handling.</p>
<p>QPlainTextEdit works on paragraphs and characters. A paragraph is a formatted string which is word-wrapped to fit into the width of the widget. By default when reading plain text, one newline signifies a paragraph. A document consists of zero or more paragraphs. Paragraphs are separated by hard line breaks. Each character within a paragraph has its own attributes, for example, font and color.</p>
<p>The shape of the mouse cursor on a QPlainTextEdit is <a href="qt.html#CursorShape-enum">Qt::IBeamCursor</a> by default. It can be changed through the <a href="qabstractscrollarea.html#viewport">viewport</a>()'s cursor property.</p>
<a name="using-qplaintextedit-as-a-display-widget"></a>
<h3>Using QPlainTextEdit as a Display Widget</h3>
<p>The text is set or replaced using <a href="qplaintextedit.html#plainText-prop">setPlainText</a>() which deletes the existing text and replaces it with the text passed to <a href="qplaintextedit.html#plainText-prop">setPlainText</a>().</p>
<p>Text can be inserted using the <a href="qtextcursor.html">QTextCursor</a> class or using the convenience functions <a href="qplaintextedit.html#insertPlainText">insertPlainText</a>(), <a href="qplaintextedit.html#appendPlainText">appendPlainText</a>() or <a href="qplaintextedit.html#paste">paste</a>().</p>
<p>By default, the text edit wraps words at whitespace to fit within the text edit widget. The <a href="qplaintextedit.html#lineWrapMode-prop">setLineWrapMode</a>() function is used to specify the kind of line wrap you want, <a href="qplaintextedit.html#LineWrapMode-enum">WidgetWidth</a> or <a href="qplaintextedit.html#LineWrapMode-enum">NoWrap</a> if you don't want any wrapping. If you use word wrap to the widget's width <a href="qplaintextedit.html#LineWrapMode-enum">WidgetWidth</a>, you can specify whether to break on whitespace or anywhere with <a href="qplaintextedit.html#wordWrapMode-prop">setWordWrapMode</a>().</p>
<p>The <a href="qplaintextedit.html#find">find</a>() function can be used to find and select a given string within the text.</p>
<p>If you want to limit the total number of paragraphs in a QPlainTextEdit, as it is for example useful in a log viewer, then you can use the <a href="qplaintextedit.html#maximumBlockCount-prop">maximumBlockCount</a> property. The combination of <a href="qplaintextedit.html#maximumBlockCount-prop">setMaximumBlockCount</a>() and <a href="qplaintextedit.html#appendPlainText">appendPlainText</a>() turns QPlainTextEdit into an efficient viewer for log text. The scrolling can be reduced with the <a href="qplaintextedit.html#centerOnScroll-prop">centerOnScroll</a>() property, making the log viewer even faster. Text can be formatted in a limited way, either using a syntax highlighter (see below), or by appending html-formatted text with <a href="qplaintextedit.html#appendHtml">appendHtml</a>(). While QPlainTextEdit does not support complex rich text rendering with tables and floats, it does support limited paragraph-based formatting that you may need in a log viewer.</p>
<a name="read-only-key-bindings"></a>
<h4>Read-only Key Bindings</h4>
<p>When QPlainTextEdit is used read-only the key bindings are limited to navigation, and text may only be selected with the mouse:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Keypresses</th><th >Action</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qt.html#ArrowType-enum">Qt::UpArrow</a></td><td >Moves one line up.</td></tr>
<tr valign="top" class="even"><td ><a href="qt.html#ArrowType-enum">Qt::DownArrow</a></td><td >Moves one line down.</td></tr>
<tr valign="top" class="odd"><td ><a href="qt.html#ArrowType-enum">Qt::LeftArrow</a></td><td >Moves one character to the left.</td></tr>
<tr valign="top" class="even"><td ><a href="qt.html#ArrowType-enum">Qt::RightArrow</a></td><td >Moves one character to the right.</td></tr>
<tr valign="top" class="odd"><td >PageUp</td><td >Moves one (viewport) page up.</td></tr>
<tr valign="top" class="even"><td >PageDown</td><td >Moves one (viewport) page down.</td></tr>
<tr valign="top" class="odd"><td >Home</td><td >Moves to the beginning of the text.</td></tr>
<tr valign="top" class="even"><td >End</td><td >Moves to the end of the text.</td></tr>
<tr valign="top" class="odd"><td >Alt+Wheel</td><td >Scrolls the page horizontally (the Wheel is the mouse wheel).</td></tr>
<tr valign="top" class="even"><td >Ctrl+Wheel</td><td >Zooms the text.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+A</td><td >Selects all text.</td></tr>
</table>
<a name="using-qplaintextedit-as-an-editor"></a>
<h3>Using QPlainTextEdit as an Editor</h3>
<p>All the information about using QPlainTextEdit as a display widget also applies here.</p>
<p>Selection of text is handled by the <a href="qtextcursor.html">QTextCursor</a> class, which provides functionality for creating selections, retrieving the text contents or deleting selections. You can retrieve the object that corresponds with the user-visible cursor using the <a href="qplaintextedit.html#textCursor">textCursor</a>() method. If you want to set a selection in QPlainTextEdit just create one on a <a href="qtextcursor.html">QTextCursor</a> object and then make that cursor the visible cursor using <a href="qwidget.html#cursor-prop">setCursor</a>(). The selection can be copied to the clipboard with <a href="qplaintextedit.html#copy">copy</a>(), or cut to the clipboard with <a href="qplaintextedit.html#cut">cut</a>(). The entire text can be selected using <a href="qplaintextedit.html#selectAll">selectAll</a>().</p>
<p>QPlainTextEdit holds a <a href="qtextdocument.html">QTextDocument</a> object which can be retrieved using the <a href="qplaintextedit.html#document">document</a>() method. You can also set your own document object using <a href="qplaintextedit.html#setDocument">setDocument</a>(). <a href="qtextdocument.html">QTextDocument</a> emits a <a href="qplaintextedit.html#textChanged">textChanged</a>() signal if the text changes and it also provides a isModified() function which will return true if the text has been modified since it was either loaded or since the last call to setModified with false as argument. In addition it provides methods for undo and redo.</p>
<a name="syntax-highlighting"></a>
<h4>Syntax Highlighting</h4>
<p>Just like <a href="qtextedit.html">QTextEdit</a>, QPlainTextEdit works together with <a href="qsyntaxhighlighter.html">QSyntaxHighlighter</a>.</p>
<a name="editing-key-bindings"></a>
<h4>Editing Key Bindings</h4>
<p>The list of key bindings which are implemented for editing:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Keypresses</th><th >Action</th></tr></thead>
<tr valign="top" class="odd"><td >Backspace</td><td >Deletes the character to the left of the cursor.</td></tr>
<tr valign="top" class="even"><td >Delete</td><td >Deletes the character to the right of the cursor.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+C</td><td >Copy the selected text to the clipboard.</td></tr>
<tr valign="top" class="even"><td >Ctrl+Insert</td><td >Copy the selected text to the clipboard.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+K</td><td >Deletes to the end of the line.</td></tr>
<tr valign="top" class="even"><td >Ctrl+V</td><td >Pastes the clipboard text into text edit.</td></tr>
<tr valign="top" class="odd"><td >Shift+Insert</td><td >Pastes the clipboard text into text edit.</td></tr>
<tr valign="top" class="even"><td >Ctrl+X</td><td >Deletes the selected text and copies it to the clipboard.</td></tr>
<tr valign="top" class="odd"><td >Shift+Delete</td><td >Deletes the selected text and copies it to the clipboard.</td></tr>
<tr valign="top" class="even"><td >Ctrl+Z</td><td >Undoes the last operation.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+Y</td><td >Redoes the last operation.</td></tr>
<tr valign="top" class="even"><td >LeftArrow</td><td >Moves the cursor one character to the left.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+LeftArrow</td><td >Moves the cursor one word to the left.</td></tr>
<tr valign="top" class="even"><td >RightArrow</td><td >Moves the cursor one character to the right.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+RightArrow</td><td >Moves the cursor one word to the right.</td></tr>
<tr valign="top" class="even"><td >UpArrow</td><td >Moves the cursor one line up.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+UpArrow</td><td >Moves the cursor one word up.</td></tr>
<tr valign="top" class="even"><td >DownArrow</td><td >Moves the cursor one line down.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+Down Arrow</td><td >Moves the cursor one word down.</td></tr>
<tr valign="top" class="even"><td >PageUp</td><td >Moves the cursor one page up.</td></tr>
<tr valign="top" class="odd"><td >PageDown</td><td >Moves the cursor one page down.</td></tr>
<tr valign="top" class="even"><td >Home</td><td >Moves the cursor to the beginning of the line.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+Home</td><td >Moves the cursor to the beginning of the text.</td></tr>
<tr valign="top" class="even"><td >End</td><td >Moves the cursor to the end of the line.</td></tr>
<tr valign="top" class="odd"><td >Ctrl+End</td><td >Moves the cursor to the end of the text.</td></tr>
<tr valign="top" class="even"><td >Alt+Wheel</td><td >Scrolls the page horizontally (the Wheel is the mouse wheel).</td></tr>
<tr valign="top" class="odd"><td >Ctrl+Wheel</td><td >Zooms the text.</td></tr>
</table>
<p>To select (mark) text hold down the Shift key whilst pressing one of the movement keystrokes, for example, <i>Shift+Right Arrow</i> will select the character to the right, and <i>Shift+Ctrl+Right Arrow</i> will select the word to the right, etc.</p>
<a name="differences-to-qtextedit"></a>
<h3>Differences to QTextEdit</h3>
<p>QPlainTextEdit is a thin class, implemented by using most of the technology that is behind <a href="qtextedit.html">QTextEdit</a> and <a href="qtextdocument.html">QTextDocument</a>. Its performance benefits over <a href="qtextedit.html">QTextEdit</a> stem mostly from using a different and simplified text layout called <a href="qplaintextdocumentlayout.html">QPlainTextDocumentLayout</a> on the text document (see <a href="qtextdocument.html#setDocumentLayout">QTextDocument::setDocumentLayout</a>()). The plain text document layout does not support tables nor embedded frames, and <i>replaces a pixel-exact height calculation with a line-by-line respectively paragraph-by-paragraph scrolling approach</i>. This makes it possible to handle significantly larger documents, and still resize the editor with line wrap enabled in real time. It also makes for a fast log viewer (see <a href="qplaintextedit.html#maximumBlockCount-prop">setMaximumBlockCount</a>()).</p>
</div>
<p><b>See also </b><a href="qtextdocument.html">QTextDocument</a>, <a href="qtextcursor.html">QTextCursor</a>, <a href="mainwindows-application.html">Application Example</a>, <a href="widgets-codeeditor.html">Code Editor Example</a>, <a href="richtext-syntaxhighlighter.html">Syntax Highlighter Example</a>, and <a href="richtext.html">Rich Text Processing</a>.</p>
<!-- @@@QPlainTextEdit -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$LineWrapMode$$$NoWrap$$$WidgetWidth -->
<h3 class="fn"><a name="LineWrapMode-enum"></a>enum QPlainTextEdit::<span class="name">LineWrapMode</span></h3>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>QPlainTextEdit::NoWrap</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>QPlainTextEdit::WidgetWidth</tt></td><td class="topAlign"><tt>1</tt></td></tr>
</table>
<!-- @@@LineWrapMode -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$backgroundVisible-prop$$$backgroundVisible$$$setBackgroundVisiblebool -->
<h3 class="fn"><a name="backgroundVisible-prop"></a><span class="name">backgroundVisible</span> : <span class="type">bool</span></h3>
<p>This property holds whether the palette background is visible outside the document area.</p>
<p>If set to true, the plain text edit paints the palette background on the viewport area not covered by the text document. Otherwise, if set to false, it won't. The feature makes it possible for the user to visually distinguish between the area of the document, painted with the base color of the palette, and the empty area not covered by any document.</p>
<p>The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>backgroundVisible</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setBackgroundVisible</b></span> ( bool <i>visible</i> )</td></tr>
</table>
<!-- @@@backgroundVisible -->
<!-- $$$blockCount-prop$$$blockCount -->
<h3 class="fn"><a name="blockCount-prop"></a><span class="name">blockCount</span> : const <span class="type">int</span></h3>
<p>This property holds the number of text blocks in the document.</p>
<p>By default, in an empty document, this property contains a value of 1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>blockCount</b></span> () const</td></tr>
</table>
<!-- @@@blockCount -->
<!-- $$$centerOnScroll-prop$$$centerOnScroll$$$setCenterOnScrollbool -->
<h3 class="fn"><a name="centerOnScroll-prop"></a><span class="name">centerOnScroll</span> : <span class="type">bool</span></h3>
<p>This property holds whether the cursor should be centered on screen.</p>
<p>If set to true, the plain text edit scrolls the document vertically to make the cursor visible at the center of the viewport. This also allows the text edit to scroll below the end of the document. Otherwise, if set to false, the plain text edit scrolls the smallest amount possible to ensure the cursor is visible. The same algorithm is applied to any new line appended through <a href="qplaintextedit.html#appendPlainText">appendPlainText</a>().</p>
<p>The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>centerOnScroll</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCenterOnScroll</b></span> ( bool <i>enabled</i> )</td></tr>
</table>
<p><b>See also </b><a href="qplaintextedit.html#centerCursor">centerCursor</a>() and <a href="qplaintextedit.html#ensureCursorVisible">ensureCursorVisible</a>().</p>
<!-- @@@centerOnScroll -->
<!-- $$$cursorWidth-prop$$$cursorWidth$$$setCursorWidthint -->
<h3 class="fn"><a name="cursorWidth-prop"></a><span class="name">cursorWidth</span> : <span class="type">int</span></h3>
<p>This property specifies the width of the cursor in pixels. The default value is 1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>cursorWidth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCursorWidth</b></span> ( int <i>width</i> )</td></tr>
</table>
<!-- @@@cursorWidth -->
<!-- $$$documentTitle-prop$$$documentTitle$$$setDocumentTitleconstQString& -->
<h3 class="fn"><a name="documentTitle-prop"></a><span class="name">documentTitle</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the title of the document parsed from the text.</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>documentTitle</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDocumentTitle</b></span> ( const QString &amp; <i>title</i> )</td></tr>
</table>
<!-- @@@documentTitle -->
<!-- $$$lineWrapMode-prop$$$lineWrapMode$$$setLineWrapModeLineWrapMode -->
<h3 class="fn"><a name="lineWrapMode-prop"></a><span class="name">lineWrapMode</span> : <span class="type"><a href="qplaintextedit.html#LineWrapMode-enum">LineWrapMode</a></span></h3>
<p>This property holds the line wrap mode.</p>
<p>The default mode is <a href="qplaintextedit.html#LineWrapMode-enum">WidgetWidth</a> which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use <a href="qplaintextedit.html#wordWrapMode-prop">setWordWrapMode</a>().</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> LineWrapMode </td><td class="memItemRight bottomAlign"><span class="name"><b>lineWrapMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setLineWrapMode</b></span> ( LineWrapMode <i>mode</i> )</td></tr>
</table>
<!-- @@@lineWrapMode -->
<!-- $$$maximumBlockCount-prop$$$maximumBlockCount$$$setMaximumBlockCountint -->
<h3 class="fn"><a name="maximumBlockCount-prop"></a><span class="name">maximumBlockCount</span> : <span class="type">int</span></h3>
<p>This property holds the limit for blocks in the document.</p>
<p>Specifies the maximum number of blocks the document may have. If there are more blocks in the document that specified with this property blocks are removed from the beginning of the document.</p>
<p>A negative or zero value specifies that the document may contain an unlimited amount of blocks.</p>
<p>The default value is 0.</p>
<p>Note that setting this property will apply the limit immediately to the document contents. Setting this property also disables the undo redo history.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>maximumBlockCount</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaximumBlockCount</b></span> ( int <i>maximum</i> )</td></tr>
</table>
<!-- @@@maximumBlockCount -->
<!-- $$$overwriteMode-prop$$$overwriteMode$$$setOverwriteModebool -->
<h3 class="fn"><a name="overwriteMode-prop"></a><span class="name">overwriteMode</span> : <span class="type">bool</span></h3>
<p>This property holds whether text entered by the user will overwrite existing text.</p>
<p>As with many text editors, the plain text editor widget can be configured to insert or overwrite existing text with new text entered by the user.</p>
<p>If this property is true, existing text is overwritten, character-for-character by new text; otherwise, text is inserted at the cursor position, displacing existing text.</p>
<p>By default, this property is false (new text does not overwrite existing text).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>overwriteMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOverwriteMode</b></span> ( bool <i>overwrite</i> )</td></tr>
</table>
<!-- @@@overwriteMode -->
<!-- $$$plainText-prop$$$toPlainText$$$setPlainTextconstQString&$$$textChanged -->
<h3 class="fn"><a name="plainText-prop"></a><span class="name">plainText</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property gets and sets the plain text editor's contents. The previous contents are removed and undo/redo history is reset when this property is set.</p>
<p>By default, for an editor with no contents, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>toPlainText</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPlainText</b></span> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qplaintextedit.html#textChanged">textChanged</a></b></span> ()</td></tr>
</table>
<!-- @@@plainText -->
<!-- $$$readOnly-prop$$$isReadOnly$$$setReadOnlybool -->
<h3 class="fn"><a name="readOnly-prop"></a><span class="name">readOnly</span> : <span class="type">bool</span></h3>
<p>This property holds whether the text edit is read-only.</p>
<p>In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible.</p>
<p>This property's default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isReadOnly</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setReadOnly</b></span> ( bool <i>ro</i> )</td></tr>
</table>
<!-- @@@readOnly -->
<!-- $$$tabChangesFocus-prop$$$tabChangesFocus$$$setTabChangesFocusbool -->
<h3 class="fn"><a name="tabChangesFocus-prop"></a><span class="name">tabChangesFocus</span> : <span class="type">bool</span></h3>
<p>This property holds whether Tab changes focus or is accepted as input.</p>
<p>In some occasions text edits should not allow the user to input tabulators or change indentation using the <b>Tab</b> key, as this breaks the focus chain. The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>tabChangesFocus</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabChangesFocus</b></span> ( bool <i>b</i> )</td></tr>
</table>
<!-- @@@tabChangesFocus -->
<!-- $$$tabStopWidth-prop$$$tabStopWidth$$$setTabStopWidthint -->
<h3 class="fn"><a name="tabStopWidth-prop"></a><span class="name">tabStopWidth</span> : <span class="type">int</span></h3>
<p>This property holds the tab stop width in pixels.</p>
<p>By default, this property contains a value of 80.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>tabStopWidth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabStopWidth</b></span> ( int <i>width</i> )</td></tr>
</table>
<!-- @@@tabStopWidth -->
<!-- $$$textInteractionFlags-prop$$$textInteractionFlags$$$setTextInteractionFlagsQt::TextInteractionFlags -->
<h3 class="fn"><a name="textInteractionFlags-prop"></a><span class="name">textInteractionFlags</span> : <span class="type"><a href="qt.html#TextInteractionFlag-enum">Qt::TextInteractionFlags</a></span></h3>
<p>Specifies how the label should interact with user input if it displays text.</p>
<p>If the flags contain either <a href="qt.html#TextInteractionFlag-enum">Qt::LinksAccessibleByKeyboard</a> or <a href="qt.html#TextInteractionFlag-enum">Qt::TextSelectableByKeyboard</a> then the focus policy is also automatically set to <a href="qt.html#FocusPolicy-enum">Qt::ClickFocus</a>.</p>
<p>The default value depends on whether the <a href="qplaintextedit.html">QPlainTextEdit</a> is read-only or editable.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextInteractionFlags </td><td class="memItemRight bottomAlign"><span class="name"><b>textInteractionFlags</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTextInteractionFlags</b></span> ( Qt::TextInteractionFlags <i>flags</i> )</td></tr>
</table>
<!-- @@@textInteractionFlags -->
<!-- $$$undoRedoEnabled-prop$$$isUndoRedoEnabled$$$setUndoRedoEnabledbool -->
<h3 class="fn"><a name="undoRedoEnabled-prop"></a><span class="name">undoRedoEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether undo and redo are enabled.</p>
<p>Users are only able to undo or redo actions if this property is true, and if there is an action that can be undone (or redone).</p>
<p>By default, this property is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isUndoRedoEnabled</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUndoRedoEnabled</b></span> ( bool <i>enable</i> )</td></tr>
</table>
<!-- @@@undoRedoEnabled -->
<!-- $$$wordWrapMode-prop$$$wordWrapMode$$$setWordWrapModeQTextOption::WrapMode -->
<h3 class="fn"><a name="wordWrapMode-prop"></a><span class="name">wordWrapMode</span> : <span class="type"><a href="qtextoption.html#WrapMode-enum">QTextOption::WrapMode</a></span></h3>
<p>This property holds the mode QPlainTextEdit will use when wrapping text by words.</p>
<p>By default, this property is set to <a href="qtextoption.html#WrapMode-enum">QTextOption::WrapAtWordBoundaryOrAnywhere</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QTextOption::WrapMode </td><td class="memItemRight bottomAlign"><span class="name"><b>wordWrapMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWordWrapMode</b></span> ( QTextOption::WrapMode <i>policy</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtextoption.html#WrapMode-enum">QTextOption::WrapMode</a>.</p>
<!-- @@@wordWrapMode -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QPlainTextEdit[overload1]$$$QPlainTextEditQWidget* -->
<h3 class="fn"><a name="QPlainTextEdit"></a>QPlainTextEdit::<span class="name">QPlainTextEdit</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an empty <a href="qplaintextedit.html">QPlainTextEdit</a> with parent <i>parent</i>.</p>
<!-- @@@QPlainTextEdit -->
<!-- $$$QPlainTextEdit$$$QPlainTextEditconstQString&QWidget* -->
<h3 class="fn"><a name="QPlainTextEdit-2"></a>QPlainTextEdit::<span class="name">QPlainTextEdit</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qplaintextedit.html">QPlainTextEdit</a> with parent <i>parent</i>. The text edit will display the plain text <i>text</i>.</p>
<!-- @@@QPlainTextEdit -->
<!-- $$$~QPlainTextEdit[overload1]$$$~QPlainTextEdit -->
<h3 class="fn"><a name="dtor.QPlainTextEdit"></a>QPlainTextEdit::<span class="name">~QPlainTextEdit</span> ()<tt> [virtual]</tt></h3>
<p>Destructor.</p>
<!-- @@@~QPlainTextEdit -->
<!-- $$$anchorAt[overload1]$$$anchorAtconstQPoint& -->
<h3 class="fn"><a name="anchorAt"></a><span class="type"><a href="qstring.html">QString</a></span> QPlainTextEdit::<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 reference of the anchor at position <i>pos</i>, or an empty string if no anchor exists at that point.</p>
<p>This function was introduced in Qt 4.7.</p>
<!-- @@@anchorAt -->
<!-- $$$appendHtml[overload1]$$$appendHtmlconstQString& -->
<h3 class="fn"><a name="appendHtml"></a><span class="type">void</span> QPlainTextEdit::<span class="name">appendHtml</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>html</i> )<tt> [slot]</tt></h3>
<p>Appends a new paragraph with <i>html</i> to the end of the text edit.</p>
<p><a href="qplaintextedit.html#appendPlainText">appendPlainText</a>()</p>
<!-- @@@appendHtml -->
<!-- $$$appendPlainText[overload1]$$$appendPlainTextconstQString& -->
<h3 class="fn"><a name="appendPlainText"></a><span class="type">void</span> QPlainTextEdit::<span class="name">appendPlainText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [slot]</tt></h3>
<p>Appends a new paragraph with <i>text</i> to the end of the text edit.</p>
<p><b>See also </b><a href="qplaintextedit.html#appendHtml">appendHtml</a>().</p>
<!-- @@@appendPlainText -->
<!-- $$$blockBoundingGeometry[overload1]$$$blockBoundingGeometryconstQTextBlock& -->
<h3 class="fn"><a name="blockBoundingGeometry"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QPlainTextEdit::<span class="name">blockBoundingGeometry</span> ( const <span class="type"><a href="qtextblock.html">QTextBlock</a></span> &amp; <i>block</i> ) const<tt> [protected]</tt></h3>
<p>Returns the bounding rectangle of the text <i>block</i> in content coordinates. Translate the rectangle with the <a href="qplaintextedit.html#contentOffset">contentOffset</a>() to get visual coordinates on the viewport.</p>
<p><b>See also </b><a href="qplaintextedit.html#firstVisibleBlock">firstVisibleBlock</a>() and <a href="qplaintextedit.html#blockBoundingRect">blockBoundingRect</a>().</p>
<!-- @@@blockBoundingGeometry -->
<!-- $$$blockBoundingRect[overload1]$$$blockBoundingRectconstQTextBlock& -->
<h3 class="fn"><a name="blockBoundingRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QPlainTextEdit::<span class="name">blockBoundingRect</span> ( const <span class="type"><a href="qtextblock.html">QTextBlock</a></span> &amp; <i>block</i> ) const<tt> [protected]</tt></h3>
<p>Returns the bounding rectangle of the text <i>block</i> in the block's own coordinates.</p>
<p><b>See also </b><a href="qplaintextedit.html#blockBoundingGeometry">blockBoundingGeometry</a>().</p>
<!-- @@@blockBoundingRect -->
<!-- $$$blockCountChanged[overload1]$$$blockCountChangedint -->
<h3 class="fn"><a name="blockCountChanged"></a><span class="type">void</span> QPlainTextEdit::<span class="name">blockCountChanged</span> ( <span class="type">int</span> <i>newBlockCount</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the block count changes. The new block count is passed in <i>newBlockCount</i>.</p>
<!-- @@@blockCountChanged -->
<!-- $$$canInsertFromMimeData[overload1]$$$canInsertFromMimeDataconstQMimeData* -->
<h3 class="fn"><a name="canInsertFromMimeData"></a><span class="type">bool</span> QPlainTextEdit::<span class="name">canInsertFromMimeData</span> ( const <span class="type"><a href="qmimedata.html">QMimeData</a></span> * <i>source</i> ) const<tt> [virtual protected]</tt></h3>
<p>This function returns true if the contents of the MIME data object, specified by <i>source</i>, can be decoded and inserted into the document. It is called for example when during a drag operation the mouse enters this widget and it is necessary to determine whether it is possible to accept the drag.</p>
<!-- @@@canInsertFromMimeData -->
<!-- $$$canPaste[overload1]$$$canPaste -->
<h3 class="fn"><a name="canPaste"></a><span class="type">bool</span> QPlainTextEdit::<span class="name">canPaste</span> () const</h3>
<p>Returns whether text can be pasted from the clipboard into the textedit.</p>
<!-- @@@canPaste -->
<!-- $$$centerCursor[overload1]$$$centerCursor -->
<h3 class="fn"><a name="centerCursor"></a><span class="type">void</span> QPlainTextEdit::<span class="name">centerCursor</span> ()<tt> [slot]</tt></h3>
<p>Scrolls the document in order to center the cursor vertically.</p>
<p><b>See also </b><a href="qplaintextedit.html#ensureCursorVisible">ensureCursorVisible</a>() and <a href="qplaintextedit.html#centerOnScroll-prop">centerOnScroll</a>.</p>
<!-- @@@centerCursor -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QPlainTextEdit::<span class="name">clear</span> ()<tt> [slot]</tt></h3>
<p>Deletes all the text in the text edit.</p>
<p>Note that the undo/redo history is cleared by this function.</p>
<p><b>See also </b><a href="qplaintextedit.html#cut">cut</a>() and <a href="qplaintextedit.html#plainText-prop">setPlainText</a>().</p>
<!-- @@@clear -->
<!-- $$$contentOffset[overload1]$$$contentOffset -->
<h3 class="fn"><a name="contentOffset"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QPlainTextEdit::<span class="name">contentOffset</span> () const<tt> [protected]</tt></h3>
<p>Returns the content's origin in viewport coordinates.</p>
<p>The origin of the content of a plain text edit is always the top left corner of the first visible text block. The content offset is different from (0,0) when the text has been scrolled horizontally, or when the first visible block has been scrolled partially off the screen, i.e&#x2e; the visible text does not start with the first line of the first visible block, or when the first visible block is the very first block and the editor displays a margin.</p>
<p><b>See also </b><a href="qplaintextedit.html#firstVisibleBlock">firstVisibleBlock</a>(), <a href="qabstractscrollarea.html#horizontalScrollBar">horizontalScrollBar</a>(), and <a href="qabstractscrollarea.html#verticalScrollBar">verticalScrollBar</a>().</p>
<!-- @@@contentOffset -->
<!-- $$$contextMenuEvent[overload1]$$$contextMenuEventQContextMenuEvent* -->
<h3 class="fn"><a name="contextMenuEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">contextMenuEvent</span> ( <span class="type"><a href="qcontextmenuevent.html">QContextMenuEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget::contextMenuEvent</a>().</p>
<p>Shows the standard context menu created with <a href="qplaintextedit.html#createStandardContextMenu">createStandardContextMenu</a>().</p>
<p>If you do not want the text edit to have a context menu, you can set its <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> to <a href="qt.html#ContextMenuPolicy-enum">Qt::NoContextMenu</a>. If you want to customize the context menu, reimplement this function. If you want to extend the standard context menu, reimplement this function, call <a href="qplaintextedit.html#createStandardContextMenu">createStandardContextMenu</a>() and extend the menu returned.</p>
<p>Information about the event is passed in the <i>event</i> object.</p>
<pre class="cpp"> <span class="type">void</span> MyQPlainTextEdit<span class="operator">::</span>contextMenuEvent(<span class="type"><a href="qcontextmenuevent.html">QContextMenuEvent</a></span> <span class="operator">*</span>event)
 {
     <span class="type"><a href="qmenu.html">QMenu</a></span> <span class="operator">*</span>menu <span class="operator">=</span> createStandardContextMenu();
     menu<span class="operator">-</span><span class="operator">&gt;</span>addAction(tr(<span class="string">&quot;My Menu Item&quot;</span>));
     <span class="comment">//...</span>
     menu<span class="operator">-</span><span class="operator">&gt;</span>exec(event<span class="operator">-</span><span class="operator">&gt;</span>globalPos());
     <span class="keyword">delete</span> menu;
 }</pre>
<!-- @@@contextMenuEvent -->
<!-- $$$copy[overload1]$$$copy -->
<h3 class="fn"><a name="copy"></a><span class="type">void</span> QPlainTextEdit::<span class="name">copy</span> ()<tt> [slot]</tt></h3>
<p>Copies any selected text to the clipboard.</p>
<p><b>See also </b><a href="qplaintextedit.html#copyAvailable">copyAvailable</a>().</p>
<!-- @@@copy -->
<!-- $$$copyAvailable[overload1]$$$copyAvailablebool -->
<h3 class="fn"><a name="copyAvailable"></a><span class="type">void</span> QPlainTextEdit::<span class="name">copyAvailable</span> ( <span class="type">bool</span> <i>yes</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when text is selected or de-selected in the text edit.</p>
<p>When text is selected this signal will be emitted with <i>yes</i> set to true. If no text has been selected or if the selected text is de-selected this signal is emitted with <i>yes</i> set to false.</p>
<p>If <i>yes</i> is true then <a href="qplaintextedit.html#copy">copy</a>() can be used to copy the selection to the clipboard. If <i>yes</i> is false then <a href="qplaintextedit.html#copy">copy</a>() does nothing.</p>
<p><b>See also </b><a href="qplaintextedit.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@copyAvailable -->
<!-- $$$createMimeDataFromSelection[overload1]$$$createMimeDataFromSelection -->
<h3 class="fn"><a name="createMimeDataFromSelection"></a><span class="type"><a href="qmimedata.html">QMimeData</a></span> * QPlainTextEdit::<span class="name">createMimeDataFromSelection</span> () const<tt> [virtual protected]</tt></h3>
<p>This function returns a new MIME data object to represent the contents of the text edit's current selection. It is called when the selection needs to be encapsulated into a new <a href="qmimedata.html">QMimeData</a> object; for example, when a drag and drop operation is started, or when data is copied to the clipboard.</p>
<p>If you reimplement this function, note that the ownership of the returned <a href="qmimedata.html">QMimeData</a> object is passed to the caller. The selection can be retrieved by using the <a href="qplaintextedit.html#textCursor">textCursor</a>() function.</p>
<!-- @@@createMimeDataFromSelection -->
<!-- $$$createStandardContextMenu[overload1]$$$createStandardContextMenu -->
<h3 class="fn"><a name="createStandardContextMenu"></a><span class="type"><a href="qmenu.html">QMenu</a></span> * QPlainTextEdit::<span class="name">createStandardContextMenu</span> ()</h3>
<p>This function creates the standard context menu which is shown when the user clicks on the line edit with the right mouse button. It is called from the default <a href="qplaintextedit.html#contextMenuEvent">contextMenuEvent</a>() handler. The popup menu's ownership is transferred to the caller.</p>
<!-- @@@createStandardContextMenu -->
<!-- $$$currentCharFormat[overload1]$$$currentCharFormat -->
<h3 class="fn"><a name="currentCharFormat"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QPlainTextEdit::<span class="name">currentCharFormat</span> () const</h3>
<p>Returns the char format that is used when inserting new text.</p>
<p><b>See also </b><a href="qplaintextedit.html#setCurrentCharFormat">setCurrentCharFormat</a>().</p>
<!-- @@@currentCharFormat -->
<!-- $$$cursorForPosition[overload1]$$$cursorForPositionconstQPoint& -->
<h3 class="fn"><a name="cursorForPosition"></a><span class="type"><a href="qtextcursor.html">QTextCursor</a></span> QPlainTextEdit::<span class="name">cursorForPosition</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> ) const</h3>
<p>returns a <a href="qtextcursor.html">QTextCursor</a> at position <i>pos</i> (in viewport coordinates).</p>
<!-- @@@cursorForPosition -->
<!-- $$$cursorPositionChanged[overload1]$$$cursorPositionChanged -->
<h3 class="fn"><a name="cursorPositionChanged"></a><span class="type">void</span> QPlainTextEdit::<span class="name">cursorPositionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the position of the cursor changed.</p>
<!-- @@@cursorPositionChanged -->
<!-- $$$cursorRect[overload1]$$$cursorRectconstQTextCursor& -->
<h3 class="fn"><a name="cursorRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QPlainTextEdit::<span class="name">cursorRect</span> ( const <span class="type"><a href="qtextcursor.html">QTextCursor</a></span> &amp; <i>cursor</i> ) const</h3>
<p>returns a rectangle (in viewport coordinates) that includes the <i>cursor</i>.</p>
<!-- @@@cursorRect -->
<!-- $$$cursorRect$$$cursorRect -->
<h3 class="fn"><a name="cursorRect-2"></a><span class="type"><a href="qrect.html">QRect</a></span> QPlainTextEdit::<span class="name">cursorRect</span> () const</h3>
<p>returns a rectangle (in viewport coordinates) that includes the cursor of the text edit.</p>
<!-- @@@cursorRect -->
<!-- $$$cut[overload1]$$$cut -->
<h3 class="fn"><a name="cut"></a><span class="type">void</span> QPlainTextEdit::<span class="name">cut</span> ()<tt> [slot]</tt></h3>
<p>Copies the selected text to the clipboard and deletes it from the text edit.</p>
<p>If there is no selected text nothing happens.</p>
<p><b>See also </b><a href="qplaintextedit.html#copy">copy</a>() and <a href="qplaintextedit.html#paste">paste</a>().</p>
<!-- @@@cut -->
<!-- $$$document[overload1]$$$document -->
<h3 class="fn"><a name="document"></a><span class="type"><a href="qtextdocument.html">QTextDocument</a></span> * QPlainTextEdit::<span class="name">document</span> () const</h3>
<p>Returns a pointer to the underlying document.</p>
<p><b>See also </b><a href="qplaintextedit.html#setDocument">setDocument</a>().</p>
<!-- @@@document -->
<!-- $$$dragEnterEvent[overload1]$$$dragEnterEventQDragEnterEvent* -->
<h3 class="fn"><a name="dragEnterEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">dragEnterEvent</span> ( <span class="type"><a href="qdragenterevent.html">QDragEnterEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragEnterEvent">QWidget::dragEnterEvent</a>().</p>
<!-- @@@dragEnterEvent -->
<!-- $$$dragLeaveEvent[overload1]$$$dragLeaveEventQDragLeaveEvent* -->
<h3 class="fn"><a name="dragLeaveEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">dragLeaveEvent</span> ( <span class="type"><a href="qdragleaveevent.html">QDragLeaveEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragLeaveEvent">QWidget::dragLeaveEvent</a>().</p>
<!-- @@@dragLeaveEvent -->
<!-- $$$dragMoveEvent[overload1]$$$dragMoveEventQDragMoveEvent* -->
<h3 class="fn"><a name="dragMoveEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">dragMoveEvent</span> ( <span class="type"><a href="qdragmoveevent.html">QDragMoveEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dragMoveEvent">QWidget::dragMoveEvent</a>().</p>
<!-- @@@dragMoveEvent -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn"><a name="dropEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">dropEvent</span> ( <span class="type"><a href="qdropevent.html">QDropEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget::dropEvent</a>().</p>
<!-- @@@dropEvent -->
<!-- $$$ensureCursorVisible[overload1]$$$ensureCursorVisible -->
<h3 class="fn"><a name="ensureCursorVisible"></a><span class="type">void</span> QPlainTextEdit::<span class="name">ensureCursorVisible</span> ()</h3>
<p>Ensures that the cursor is visible by scrolling the text edit if necessary.</p>
<p><b>See also </b><a href="qplaintextedit.html#centerCursor">centerCursor</a>() and <a href="qplaintextedit.html#centerOnScroll-prop">centerOnScroll</a>.</p>
<!-- @@@ensureCursorVisible -->
<!-- $$$extraSelections[overload1]$$$extraSelections -->
<h3 class="fn"><a name="extraSelections"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtextedit-extraselection.html">QTextEdit::ExtraSelection</a></span>&gt; QPlainTextEdit::<span class="name">extraSelections</span> () const</h3>
<p>Returns previously set extra selections.</p>
<p><b>See also </b><a href="qplaintextedit.html#setExtraSelections">setExtraSelections</a>().</p>
<!-- @@@extraSelections -->
<!-- $$$find[overload1]$$$findconstQString&QTextDocument::FindFlags -->
<h3 class="fn"><a name="find"></a><span class="type">bool</span> QPlainTextEdit::<span class="name">find</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>exp</i>, <span class="type"><a href="qtextdocument.html#FindFlag-enum">QTextDocument::FindFlags</a></span> <i>options</i> = 0 )</h3>
<p>Finds the next occurrence of the string, <i>exp</i>, using the given <i>options</i>. Returns true if <i>exp</i> was found and changes the cursor to select the match; otherwise returns false.</p>
<!-- @@@find -->
<!-- $$$firstVisibleBlock[overload1]$$$firstVisibleBlock -->
<h3 class="fn"><a name="firstVisibleBlock"></a><span class="type"><a href="qtextblock.html">QTextBlock</a></span> QPlainTextEdit::<span class="name">firstVisibleBlock</span> () const<tt> [protected]</tt></h3>
<p>Returns the first visible block.</p>
<p><b>See also </b><a href="qplaintextedit.html#blockBoundingRect">blockBoundingRect</a>().</p>
<!-- @@@firstVisibleBlock -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn"><a name="focusInEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">focusInEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p>
<!-- @@@focusInEvent -->
<!-- $$$focusNextPrevChild[overload1]$$$focusNextPrevChildbool -->
<h3 class="fn"><a name="focusNextPrevChild"></a><span class="type">bool</span> QPlainTextEdit::<span class="name">focusNextPrevChild</span> ( <span class="type">bool</span> <i>next</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusNextPrevChild">QWidget::focusNextPrevChild</a>().</p>
<!-- @@@focusNextPrevChild -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn"><a name="focusOutEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">focusOutEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>().</p>
<!-- @@@focusOutEvent -->
<!-- $$$getPaintContext[overload1]$$$getPaintContext -->
<h3 class="fn"><a name="getPaintContext"></a><span class="type"><a href="qabstracttextdocumentlayout-paintcontext.html">QAbstractTextDocumentLayout::PaintContext</a></span> QPlainTextEdit::<span class="name">getPaintContext</span> () const<tt> [protected]</tt></h3>
<p>Returns the paint context for the <a href="qabstractscrollarea.html#viewport">viewport</a>(), useful only when reimplementing <a href="qplaintextedit.html#paintEvent">paintEvent</a>().</p>
<!-- @@@getPaintContext -->
<!-- $$$inputMethodEvent[overload1]$$$inputMethodEventQInputMethodEvent* -->
<h3 class="fn"><a name="inputMethodEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">inputMethodEvent</span> ( <span class="type"><a href="qinputmethodevent.html">QInputMethodEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>().</p>
<!-- @@@inputMethodEvent -->
<!-- $$$inputMethodQuery[overload1]$$$inputMethodQueryQt::InputMethodQuery -->
<h3 class="fn"><a name="inputMethodQuery"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QPlainTextEdit::<span class="name">inputMethodQuery</span> ( <span class="type"><a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a></span> <i>property</i> ) const<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>().</p>
<!-- @@@inputMethodQuery -->
<!-- $$$insertFromMimeData[overload1]$$$insertFromMimeDataconstQMimeData* -->
<h3 class="fn"><a name="insertFromMimeData"></a><span class="type">void</span> QPlainTextEdit::<span class="name">insertFromMimeData</span> ( const <span class="type"><a href="qmimedata.html">QMimeData</a></span> * <i>source</i> )<tt> [virtual protected]</tt></h3>
<p>This function inserts the contents of the MIME data object, specified by <i>source</i>, into the text edit at the current cursor position. It is called whenever text is inserted as the result of a clipboard paste operation, or when the text edit accepts data from a drag and drop operation.</p>
<!-- @@@insertFromMimeData -->
<!-- $$$insertPlainText[overload1]$$$insertPlainTextconstQString& -->
<h3 class="fn"><a name="insertPlainText"></a><span class="type">void</span> QPlainTextEdit::<span class="name">insertPlainText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [slot]</tt></h3>
<p>Convenience slot that inserts <i>text</i> at the current cursor position.</p>
<p>It is equivalent to</p>
<pre class="cpp"> edit<span class="operator">-</span><span class="operator">&gt;</span><a href="qplaintextedit.html#textCursor">textCursor</a>()<span class="operator">.</span>insertText(text);</pre>
<!-- @@@insertPlainText -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$keyReleaseEvent[overload1]$$$keyReleaseEventQKeyEvent* -->
<h3 class="fn"><a name="keyReleaseEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">keyReleaseEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyReleaseEvent">QWidget::keyReleaseEvent</a>().</p>
<!-- @@@keyReleaseEvent -->
<!-- $$$loadResource[overload1]$$$loadResourceintconstQUrl& -->
<h3 class="fn"><a name="loadResource"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QPlainTextEdit::<span class="name">loadResource</span> ( <span class="type">int</span> <i>type</i>, const <span class="type"><a href="qurl.html">QUrl</a></span> &amp; <i>name</i> )<tt> [virtual]</tt></h3>
<p>Loads the resource specified by the given <i>type</i> and <i>name</i>.</p>
<p>This function is an extension of <a href="qtextdocument.html#loadResource">QTextDocument::loadResource</a>().</p>
<p><b>See also </b><a href="qtextdocument.html#loadResource">QTextDocument::loadResource</a>().</p>
<!-- @@@loadResource -->
<!-- $$$mergeCurrentCharFormat[overload1]$$$mergeCurrentCharFormatconstQTextCharFormat& -->
<h3 class="fn"><a name="mergeCurrentCharFormat"></a><span class="type">void</span> QPlainTextEdit::<span class="name">mergeCurrentCharFormat</span> ( const <span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> &amp; <i>modifier</i> )</h3>
<p>Merges the properties specified in <i>modifier</i> into the current character format by calling QTextCursor::mergeCharFormat on the editor's cursor. If the editor has a selection then the properties of <i>modifier</i> are directly applied to the selection.</p>
<p><b>See also </b><a href="qtextcursor.html#mergeCharFormat">QTextCursor::mergeCharFormat</a>().</p>
<!-- @@@mergeCurrentCharFormat -->
<!-- $$$modificationChanged[overload1]$$$modificationChangedbool -->
<h3 class="fn"><a name="modificationChanged"></a><span class="type">void</span> QPlainTextEdit::<span class="name">modificationChanged</span> ( <span class="type">bool</span> <i>changed</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the content of the document changes in a way that affects the modification state. If <i>changed</i> is true, the document has been modified; otherwise it is false.</p>
<p>For example, calling setModified(false) on a document and then inserting text causes the signal to get emitted. If you undo that operation, causing the document to return to its original unmodified state, the signal will get emitted again.</p>
<!-- @@@modificationChanged -->
<!-- $$$mouseDoubleClickEvent[overload1]$$$mouseDoubleClickEventQMouseEvent* -->
<h3 class="fn"><a name="mouseDoubleClickEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">mouseDoubleClickEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseDoubleClickEvent">QWidget::mouseDoubleClickEvent</a>().</p>
<!-- @@@mouseDoubleClickEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn"><a name="mouseMoveEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">mouseMoveEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>().</p>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn"><a name="mousePressEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">mousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn"><a name="mouseReleaseEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">mouseReleaseEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<!-- @@@mouseReleaseEvent -->
<!-- $$$moveCursor[overload1]$$$moveCursorQTextCursor::MoveOperationQTextCursor::MoveMode -->
<h3 class="fn"><a name="moveCursor"></a><span class="type">void</span> QPlainTextEdit::<span class="name">moveCursor</span> ( <span class="type"><a href="qtextcursor.html#MoveOperation-enum">QTextCursor::MoveOperation</a></span> <i>operation</i>, <span class="type"><a href="qtextcursor.html#MoveMode-enum">QTextCursor::MoveMode</a></span> <i>mode</i> = QTextCursor::MoveAnchor )</h3>
<p>Moves the cursor by performing the given <i>operation</i>.</p>
<p>If <i>mode</i> is <a href="qtextcursor.html#MoveMode-enum">QTextCursor::KeepAnchor</a>, the cursor selects the text it moves over. This is the same effect that the user achieves when they hold down the Shift key and move the cursor with the cursor keys.</p>
<p><b>See also </b><a href="qtextcursor.html#movePosition">QTextCursor::movePosition</a>().</p>
<!-- @@@moveCursor -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn"><a name="paintEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$paste[overload1]$$$paste -->
<h3 class="fn"><a name="paste"></a><span class="type">void</span> QPlainTextEdit::<span class="name">paste</span> ()<tt> [slot]</tt></h3>
<p>Pastes the text from the clipboard into the text edit at the current cursor position.</p>
<p>If there is no text in the clipboard nothing happens.</p>
<p>To change the behavior of this function, i.e&#x2e; to modify what <a href="qplaintextedit.html">QPlainTextEdit</a> can paste and how it is being pasted, reimplement the virtual <a href="qplaintextedit.html#canInsertFromMimeData">canInsertFromMimeData</a>() and <a href="qplaintextedit.html#insertFromMimeData">insertFromMimeData</a>() functions.</p>
<p><b>See also </b><a href="qplaintextedit.html#cut">cut</a>() and <a href="qplaintextedit.html#copy">copy</a>().</p>
<!-- @@@paste -->
<!-- $$$print[overload1]$$$printQPrinter* -->
<h3 class="fn"><a name="print"></a><span class="type">void</span> QPlainTextEdit::<span class="name">print</span> ( <span class="type"><a href="qprinter.html">QPrinter</a></span> * <i>printer</i> ) const</h3>
<p>Convenience function to print the text edit's document to the given <i>printer</i>. This is equivalent to calling the print method on the document directly except that this function also supports <a href="qprinter.html#PrintRange-enum">QPrinter::Selection</a> as print range.</p>
<p><b>See also </b><a href="qtextdocument.html#print">QTextDocument::print</a>().</p>
<!-- @@@print -->
<!-- $$$redo[overload1]$$$redo -->
<h3 class="fn"><a name="redo"></a><span class="type">void</span> QPlainTextEdit::<span class="name">redo</span> ()<tt> [slot]</tt></h3>
<p>Redoes the last operation.</p>
<p>If there is no operation to redo, i.e&#x2e; there is no redo step in the undo/redo history, nothing happens.</p>
<p><b>See also </b><a href="qplaintextedit.html#undo">undo</a>().</p>
<!-- @@@redo -->
<!-- $$$redoAvailable[overload1]$$$redoAvailablebool -->
<h3 class="fn"><a name="redoAvailable"></a><span class="type">void</span> QPlainTextEdit::<span class="name">redoAvailable</span> ( <span class="type">bool</span> <i>available</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever redo operations become available (<i>available</i> is true) or unavailable (<i>available</i> is false).</p>
<!-- @@@redoAvailable -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$scrollContentsBy[overload1]$$$scrollContentsByintint -->
<h3 class="fn"><a name="scrollContentsBy"></a><span class="type">void</span> QPlainTextEdit::<span class="name">scrollContentsBy</span> ( <span class="type">int</span> <i>dx</i>, <span class="type">int</span> <i>dy</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractscrollarea.html#scrollContentsBy">QAbstractScrollArea::scrollContentsBy</a>().</p>
<!-- @@@scrollContentsBy -->
<!-- $$$selectAll[overload1]$$$selectAll -->
<h3 class="fn"><a name="selectAll"></a><span class="type">void</span> QPlainTextEdit::<span class="name">selectAll</span> ()<tt> [slot]</tt></h3>
<p>Selects all text.</p>
<p><b>See also </b><a href="qplaintextedit.html#copy">copy</a>(), <a href="qplaintextedit.html#cut">cut</a>(), and <a href="qplaintextedit.html#textCursor">textCursor</a>().</p>
<!-- @@@selectAll -->
<!-- $$$selectionChanged[overload1]$$$selectionChanged -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> QPlainTextEdit::<span class="name">selectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the selection changes.</p>
<p><b>See also </b><a href="qplaintextedit.html#copyAvailable">copyAvailable</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setCurrentCharFormat[overload1]$$$setCurrentCharFormatconstQTextCharFormat& -->
<h3 class="fn"><a name="setCurrentCharFormat"></a><span class="type">void</span> QPlainTextEdit::<span class="name">setCurrentCharFormat</span> ( const <span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> &amp; <i>format</i> )</h3>
<p>Sets the char format that is be used when inserting new text to <i>format</i> by calling <a href="qtextcursor.html#setCharFormat">QTextCursor::setCharFormat</a>() on the editor's cursor. If the editor has a selection then the char format is directly applied to the selection.</p>
<p><b>See also </b><a href="qplaintextedit.html#currentCharFormat">currentCharFormat</a>().</p>
<!-- @@@setCurrentCharFormat -->
<!-- $$$setDocument[overload1]$$$setDocumentQTextDocument* -->
<h3 class="fn"><a name="setDocument"></a><span class="type">void</span> QPlainTextEdit::<span class="name">setDocument</span> ( <span class="type"><a href="qtextdocument.html">QTextDocument</a></span> * <i>document</i> )</h3>
<p>Makes <i>document</i> the new document of the text editor.</p>
<p>The parent <a href="qobject.html">QObject</a> of the provided document remains the owner of the object. If the current document is a child of the text editor, then it is deleted.</p>
<p>The document must have a document layout that inherits <a href="qplaintextdocumentlayout.html">QPlainTextDocumentLayout</a> (see <a href="qtextdocument.html#setDocumentLayout">QTextDocument::setDocumentLayout</a>()).</p>
<p><b>See also </b><a href="qplaintextedit.html#document">document</a>().</p>
<!-- @@@setDocument -->
<!-- $$$setExtraSelections[overload1]$$$setExtraSelectionsconstQList<QTextEdit::ExtraSelection>& -->
<h3 class="fn"><a name="setExtraSelections"></a><span class="type">void</span> QPlainTextEdit::<span class="name">setExtraSelections</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtextedit-extraselection.html">QTextEdit::ExtraSelection</a></span>&gt; &amp; <i>selections</i> )</h3>
<p>This function allows temporarily marking certain regions in the document with a given color, specified as <i>selections</i>. This can be useful for example in a programming editor to mark a whole line of text with a given background color to indicate the existence of a breakpoint.</p>
<p><b>See also </b><a href="qtextedit-extraselection.html">QTextEdit::ExtraSelection</a> and <a href="qplaintextedit.html#extraSelections">extraSelections</a>().</p>
<!-- @@@setExtraSelections -->
<!-- $$$setTextCursor[overload1]$$$setTextCursorconstQTextCursor& -->
<h3 class="fn"><a name="setTextCursor"></a><span class="type">void</span> QPlainTextEdit::<span class="name">setTextCursor</span> ( const <span class="type"><a href="qtextcursor.html">QTextCursor</a></span> &amp; <i>cursor</i> )</h3>
<p>Sets the visible <i>cursor</i>.</p>
<p><b>See also </b><a href="qplaintextedit.html#textCursor">textCursor</a>().</p>
<!-- @@@setTextCursor -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn"><a name="showEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">showEvent</span> ( <span class="type"><a href="qshowevent.html">QShowEvent</a></span> * )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
<!-- @@@showEvent -->
<!-- $$$textChanged[overload1]$$$textChanged -->
<h3 class="fn"><a name="textChanged"></a><span class="type">void</span> QPlainTextEdit::<span class="name">textChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied.</p>
<!-- @@@textChanged -->
<!-- $$$textCursor[overload1]$$$textCursor -->
<h3 class="fn"><a name="textCursor"></a><span class="type"><a href="qtextcursor.html">QTextCursor</a></span> QPlainTextEdit::<span class="name">textCursor</span> () const</h3>
<p>Returns a copy of the <a href="qtextcursor.html">QTextCursor</a> that represents the currently visible cursor. Note that changes on the returned cursor do not affect <a href="qplaintextedit.html">QPlainTextEdit</a>'s cursor; use <a href="qplaintextedit.html#setTextCursor">setTextCursor</a>() to update the visible cursor.</p>
<p><b>See also </b><a href="qplaintextedit.html#setTextCursor">setTextCursor</a>().</p>
<!-- @@@textCursor -->
<!-- $$$undo[overload1]$$$undo -->
<h3 class="fn"><a name="undo"></a><span class="type">void</span> QPlainTextEdit::<span class="name">undo</span> ()<tt> [slot]</tt></h3>
<p>Undoes the last operation.</p>
<p>If there is no operation to undo, i.e&#x2e; there is no undo step in the undo/redo history, nothing happens.</p>
<p><b>See also </b><a href="qplaintextedit.html#redo">redo</a>().</p>
<!-- @@@undo -->
<!-- $$$undoAvailable[overload1]$$$undoAvailablebool -->
<h3 class="fn"><a name="undoAvailable"></a><span class="type">void</span> QPlainTextEdit::<span class="name">undoAvailable</span> ( <span class="type">bool</span> <i>available</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever undo operations become available (<i>available</i> is true) or unavailable (<i>available</i> is false).</p>
<!-- @@@undoAvailable -->
<!-- $$$updateRequest[overload1]$$$updateRequestconstQRect&int -->
<h3 class="fn"><a name="updateRequest"></a><span class="type">void</span> QPlainTextEdit::<span class="name">updateRequest</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i>, <span class="type">int</span> <i>dy</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the text document needs an update of the specified <i>rect</i>. If the text is scrolled, <i>rect</i> will cover the entire viewport area. If the text is scrolled vertically, <i>dy</i> carries the amount of pixels the viewport was scrolled.</p>
<p>The purpose of the signal is to support extra widgets in plain text edit subclasses that e.g&#x2e; show line numbers, breakpoints, or other extra information.</p>
<!-- @@@updateRequest -->
<!-- $$$wheelEvent[overload1]$$$wheelEventQWheelEvent* -->
<h3 class="fn"><a name="wheelEvent"></a><span class="type">void</span> QPlainTextEdit::<span class="name">wheelEvent</span> ( <span class="type"><a href="qwheelevent.html">QWheelEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget::wheelEvent</a>().</p>
<!-- @@@wheelEvent -->
</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>