Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 833

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QLineEdit Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QLineEdit Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QLineEdit widget is a one-line text editor. <a href="#details">More...</a></p>

<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qlineedit.html#EchoMode-enum">EchoMode</a></b> { Normal, NoEcho, Password, PasswordEchoOnEdit }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qlineedit.html#QLineEdit">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qlineedit.html#QLineEdit-2">__init__</a></b> (<i>self</i>, QString&#160;<i>contents</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />Qt.Alignment <b><a href="qlineedit.html#alignment">alignment</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#backspace">backspace</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />QCompleter <b><a href="qlineedit.html#completer">completer</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QContextMenuEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#copy">copy</a></b> (<i>self</i>)</li><li><div class="fn" />QMenu <b><a href="qlineedit.html#createStandardContextMenu">createStandardContextMenu</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#cursorBackward">cursorBackward</a></b> (<i>self</i>, bool&#160;<i>mark</i>, int&#160;<i>steps</i>&#160;=&#160;1)</li><li><div class="fn" /><b><a href="qlineedit.html#cursorForward">cursorForward</a></b> (<i>self</i>, bool&#160;<i>mark</i>, int&#160;<i>steps</i>&#160;=&#160;1)</li><li><div class="fn" />Qt.CursorMoveStyle <b><a href="qlineedit.html#cursorMoveStyle">cursorMoveStyle</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qlineedit.html#cursorPosition">cursorPosition</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qlineedit.html#cursorPositionAt">cursorPositionAt</a></b> (<i>self</i>, QPoint&#160;<i>pos</i>)</li><li><div class="fn" />QRect <b><a href="qlineedit.html#cursorRect">cursorRect</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#cursorWordBackward">cursorWordBackward</a></b> (<i>self</i>, bool&#160;<i>mark</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#cursorWordForward">cursorWordForward</a></b> (<i>self</i>, bool&#160;<i>mark</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#cut">cut</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#del">del_</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#deselect">deselect</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qlineedit.html#displayText">displayText</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#dragEnabled">dragEnabled</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#dragEnterEvent">dragEnterEvent</a></b> (<i>self</i>, QDragEnterEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#dragLeaveEvent">dragLeaveEvent</a></b> (<i>self</i>, QDragLeaveEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#dragMoveEvent">dragMoveEvent</a></b> (<i>self</i>, QDragMoveEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#dropEvent">dropEvent</a></b> (<i>self</i>, QDropEvent)</li><li><div class="fn" />EchoMode <b><a href="qlineedit.html#echoMode">echoMode</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#end">end</a></b> (<i>self</i>, bool&#160;<i>mark</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent)</li><li><div class="fn" />(int&#160;<i>left</i>, int&#160;<i>top</i>, int&#160;<i>right</i>, int&#160;<i>bottom</i>) <b><a href="qlineedit.html#getTextMargins">getTextMargins</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#hasAcceptableInput">hasAcceptableInput</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#hasFrame">hasFrame</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#hasSelectedText">hasSelectedText</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#home">home</a></b> (<i>self</i>, bool&#160;<i>mark</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#initStyleOption">initStyleOption</a></b> (<i>self</i>, QStyleOptionFrame&#160;<i>option</i>)</li><li><div class="fn" />QString <b><a href="qlineedit.html#inputMask">inputMask</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#inputMethodEvent">inputMethodEvent</a></b> (<i>self</i>, QInputMethodEvent)</li><li><div class="fn" />QVariant <b><a href="qlineedit.html#inputMethodQuery">inputMethodQuery</a></b> (<i>self</i>, Qt.InputMethodQuery)</li><li><div class="fn" /><b><a href="qlineedit.html#insert">insert</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="qlineedit.html#isModified">isModified</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#isReadOnly">isReadOnly</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#isRedoAvailable">isRedoAvailable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qlineedit.html#isUndoAvailable">isUndoAvailable</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" />int <b><a href="qlineedit.html#maxLength">maxLength</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qlineedit.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent)</li><li><div class="fn" /><b><a href="qlineedit.html#paste">paste</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qlineedit.html#placeholderText">placeholderText</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#redo">redo</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#selectAll">selectAll</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qlineedit.html#selectedText">selectedText</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qlineedit.html#selectionStart">selectionStart</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setAlignment">setAlignment</a></b> (<i>self</i>, Qt.Alignment&#160;<i>flag</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setCompleter">setCompleter</a></b> (<i>self</i>, QCompleter&#160;<i>completer</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setCursorMoveStyle">setCursorMoveStyle</a></b> (<i>self</i>, Qt.CursorMoveStyle&#160;<i>style</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setCursorPosition">setCursorPosition</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qlineedit.html#setDragEnabled">setDragEnabled</a></b> (<i>self</i>, bool&#160;<i>b</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setEchoMode">setEchoMode</a></b> (<i>self</i>, EchoMode)</li><li><div class="fn" /><b><a href="qlineedit.html#setFrame">setFrame</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qlineedit.html#setInputMask">setInputMask</a></b> (<i>self</i>, QString&#160;<i>inputMask</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setMaxLength">setMaxLength</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qlineedit.html#setModified">setModified</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qlineedit.html#setPlaceholderText">setPlaceholderText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qlineedit.html#setReadOnly">setReadOnly</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qlineedit.html#setSelection">setSelection</a></b> (<i>self</i>, int, int)</li><li><div class="fn" /><b><a href="qlineedit.html#setText">setText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qlineedit.html#setTextMargins">setTextMargins</a></b> (<i>self</i>, int&#160;<i>left</i>, int&#160;<i>top</i>, int&#160;<i>right</i>, int&#160;<i>bottom</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setTextMargins-2">setTextMargins</a></b> (<i>self</i>, QMargins&#160;<i>margins</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#setValidator">setValidator</a></b> (<i>self</i>, QValidator)</li><li><div class="fn" />QSize <b><a href="qlineedit.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qlineedit.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />QMargins <b><a href="qlineedit.html#textMargins">textMargins</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qlineedit.html#undo">undo</a></b> (<i>self</i>)</li><li><div class="fn" />QValidator <b><a href="qlineedit.html#validator">validator</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qlineedit.html#cursorPositionChanged">cursorPositionChanged</a></b> (int,int)</li><li><div class="fn" />void <b><a href="qlineedit.html#editingFinished">editingFinished</a></b> ()</li><li><div class="fn" />void <b><a href="qlineedit.html#returnPressed">returnPressed</a></b> ()</li><li><div class="fn" />void <b><a href="qlineedit.html#selectionChanged">selectionChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qlineedit.html#textChanged">textChanged</a></b> (const QString&amp;)</li><li><div class="fn" />void <b><a href="qlineedit.html#textEdited">textEdited</a></b> (const QString&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QLineEdit widget is a one-line text editor.</p>
<p>A line edit allows the user to enter and edit a single line of
plain text with a useful collection of editing functions, including
undo and redo, cut and paste, and drag and drop.</p>
<p>By changing the <a href="qlineedit.html#echoMode-prop">echoMode</a>() of a line edit, it
can also be used as a "write-only" field, for inputs such as
passwords.</p>
<p>The length of the text can be constrained to <a href="qlineedit.html#maxLength-prop">maxLength</a>(). The text can be
arbitrarily constrained using a <a href="qlineedit.html#validator">validator</a>() or an <a href="qlineedit.html#inputMask-prop">inputMask</a>(), or both. When
switching between a validator and an input mask on the same line
edit, it is best to clear the validator or input mask to prevent
undefined behavior.</p>
<p>A related class is <a href="qtextedit.html">QTextEdit</a> which
allows multi-line, rich text editing.</p>
<p>You can change the text with <a href="qlineedit.html#text-prop">setText</a>() or <a href="qlineedit.html#insert">insert</a>(). The text is retrieved with
<a href="qlineedit.html#text-prop">text</a>(); the displayed text
(which may be different, see <a href="qlineedit.html#EchoMode-enum">EchoMode</a>) is retrieved with
<a href="qlineedit.html#displayText-prop">displayText</a>(). Text
can be selected with <a href="qlineedit.html#setSelection">setSelection</a>() or <a href="qlineedit.html#selectAll">selectAll</a>(), and the selection can
be <a href="qlineedit.html#cut">cut</a>(), <a href="qlineedit.html#copy">copy</a>()ied and <a href="qlineedit.html#paste">paste</a>()d. The text can be aligned with
<a href="qlineedit.html#alignment-prop">setAlignment</a>().</p>
<p>When the text changes the <a href="qlineedit.html#textChanged">textChanged</a>() signal is emitted;
when the text changes other than by calling <a href="qlineedit.html#text-prop">setText</a>() the <a href="qlineedit.html#textEdited">textEdited</a>() signal is emitted;
when the cursor is moved the <a href="qlineedit.html#cursorPositionChanged">cursorPositionChanged</a>()
signal is emitted; and when the Return or Enter key is pressed the
<a href="qlineedit.html#returnPressed">returnPressed</a>() signal
is emitted.</p>
<p>When editing is finished, either because the line edit lost
focus or Return/Enter is pressed the <a href="qlineedit.html#editingFinished">editingFinished</a>() signal is
emitted.</p>
<p>Note that if there is a validator set on the line edit, the
<a href="qlineedit.html#returnPressed">returnPressed</a>()/<a href="qlineedit.html#editingFinished">editingFinished</a>() signals will
only be emitted if the validator returns <a href="qvalidator.html#State-enum">QValidator.Acceptable</a>.</p>
<p>By default, QLineEdits have a frame as specified by the Windows
and Motif style guides; you can turn it off by calling
setFrame(false).</p>
<p>The default key bindings are described below. The line edit also
provides a context menu (usually invoked by a right mouse click)
that presents some of these editing options. <a id="desc" name="desc" /></p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Keypress</th>
<th>Action</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>Left Arrow</td>
<td>Moves the cursor one character to the left.</td>
</tr>
<tr class="even" valign="top">
<td>Shift+Left Arrow</td>
<td>Moves and selects text one character to the left.</td>
</tr>
<tr class="odd" valign="top">
<td>Right Arrow</td>
<td>Moves the cursor one character to the right.</td>
</tr>
<tr class="even" valign="top">
<td>Shift+Right Arrow</td>
<td>Moves and selects text one character to the right.</td>
</tr>
<tr class="odd" valign="top">
<td>Home</td>
<td>Moves the cursor to the beginning of the line.</td>
</tr>
<tr class="even" valign="top">
<td>End</td>
<td>Moves the cursor to the end of the line.</td>
</tr>
<tr class="odd" valign="top">
<td>Backspace</td>
<td>Deletes the character to the left of the cursor.</td>
</tr>
<tr class="even" valign="top">
<td>Ctrl+Backspace</td>
<td>Deletes the word to the left of the cursor.</td>
</tr>
<tr class="odd" valign="top">
<td>Delete</td>
<td>Deletes the character to the right of the cursor.</td>
</tr>
<tr class="even" valign="top">
<td>Ctrl+Delete</td>
<td>Deletes the word to the right of the cursor.</td>
</tr>
<tr class="odd" valign="top">
<td>Ctrl+A</td>
<td>Select all.</td>
</tr>
<tr class="even" valign="top">
<td>Ctrl+C</td>
<td>Copies the selected text to the clipboard.</td>
</tr>
<tr class="odd" valign="top">
<td>Ctrl+Insert</td>
<td>Copies the selected text to the clipboard.</td>
</tr>
<tr class="even" valign="top">
<td>Ctrl+K</td>
<td>Deletes to the end of the line.</td>
</tr>
<tr class="odd" valign="top">
<td>Ctrl+V</td>
<td>Pastes the clipboard text into line edit.</td>
</tr>
<tr class="even" valign="top">
<td>Shift+Insert</td>
<td>Pastes the clipboard text into line edit.</td>
</tr>
<tr class="odd" valign="top">
<td>Ctrl+X</td>
<td>Deletes the selected text and copies it to the clipboard.</td>
</tr>
<tr class="even" valign="top">
<td>Shift+Delete</td>
<td>Deletes the selected text and copies it to the clipboard.</td>
</tr>
<tr class="odd" valign="top">
<td>Ctrl+Z</td>
<td>Undoes the last operation.</td>
</tr>
<tr class="even" valign="top">
<td>Ctrl+Y</td>
<td>Redoes the last undone operation.</td>
</tr>
</table>
<p>Any other key sequence that represents a valid character, will
cause the character to be inserted into the line edit.</p>
<table class="generic" width="100%">
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Macintosh style line edit" src="images/macintosh-lineedit.png" /></td>
<td>A line edit shown in the <a href="gallery-macintosh.html">Macintosh widget style</a>.</td>
</tr>
<tr class="even" valign="top">
<td><img alt="Screenshot of a Windows XP style line edit" src="images/windows-lineedit.png" /></td>
<td>A line edit shown in the <a href="gallery-windowsxp.html">Windows XP widget style</a>.</td>
</tr>
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Plastique style line edit" src="images/plastique-lineedit.png" /></td>
<td>A line edit shown in the <a href="gallery-plastique.html">Plastique widget style</a>.</td>
</tr>
</table>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="EchoMode-enum" />QLineEdit.EchoMode</h3><p>This enum type describes how a line edit should display its
contents.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QLineEdit.Normal</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Display characters as they are entered. This
is the default.</td>
</tr>
<tr>
<td class="topAlign"><tt>QLineEdit.NoEcho</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Do not display anything. This may be
appropriate for passwords where even the length of the password
should be kept secret.</td>
</tr>
<tr>
<td class="topAlign"><tt>QLineEdit.Password</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Display asterisks instead of the characters
actually entered.</td>
</tr>
<tr>
<td class="topAlign"><tt>QLineEdit.PasswordEchoOnEdit</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Display characters as they are entered while
editing otherwise display asterisks.</td>
</tr>
</table>
<p><b>See also</b> <a href="qlineedit.html#echoMode-prop">setEchoMode</a>() and <a href="qlineedit.html#echoMode-prop">echoMode</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QLineEdit" />QLineEdit.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a line edit with no text.</p>
<p>The maximum text length is set to 32767 characters.</p>
<p>The <i>parent</i> argument is sent to the <a href="qwidget.html">QWidget</a> constructor.</p>
<p><b>See also</b> <a href="qlineedit.html#text-prop">setText</a>()
and <a href="qlineedit.html#maxLength-prop">setMaxLength</a>().</p>


<h3 class="fn"><a name="QLineEdit-2" />QLineEdit.__init__ (<i>self</i>, QString&#160;<i>contents</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a line edit containing the text <i>contents</i>.</p>
<p>The cursor position is set to the end of the line and the
maximum text length to 32767 characters.</p>
<p>The <i>parent</i> and argument is sent to the <a href="qwidget.html">QWidget</a> constructor.</p>
<p><b>See also</b> <a href="qlineedit.html#text-prop">text</a>()
and <a href="qlineedit.html#maxLength-prop">setMaxLength</a>().</p>


<h3 class="fn"><a name="alignment" /><a href="qt-alignment.html">Qt.Alignment</a> QLineEdit.alignment (<i>self</i>)</h3><h3 class="fn"><a name="backspace" />QLineEdit.backspace (<i>self</i>)</h3><p>If no text is selected, deletes the character to the left of the
text cursor and moves the cursor one position to the left. If any
text is selected, the cursor is moved to the beginning of the
selected text and the selected text is deleted.</p>
<p><b>See also</b> <a href="qlineedit.html#del">del_</a>().</p>


<h3 class="fn"><a name="changeEvent" />QLineEdit.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget.changeEvent</a>().</p>


<h3 class="fn"><a name="clear" />QLineEdit.clear (<i>self</i>)</h3><p>Clears the contents of the line edit.</p>
<p><b>See also</b> <a href="qlineedit.html#text-prop">setText</a>()
and <a href="qlineedit.html#insert">insert</a>().</p>


<h3 class="fn"><a name="completer" /><a href="qcompleter.html">QCompleter</a> QLineEdit.completer (<i>self</i>)</h3><p>Returns the current <a href="qcompleter.html">QCompleter</a>
that provides completions.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qlineedit.html#setCompleter">setCompleter</a>().</p>


<h3 class="fn"><a name="contextMenuEvent" />QLineEdit.contextMenuEvent (<i>self</i>, <a href="qcontextmenuevent.html">QContextMenuEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget.contextMenuEvent</a>().</p>
<p>Shows the standard context menu created with <a href="qlineedit.html#createStandardContextMenu">createStandardContextMenu</a>().</p>
<p>If you do not want the line 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="qlineedit.html#createStandardContextMenu">createStandardContextMenu</a>()
and extend the menu returned.</p>
<pre class="cpp">
 <span class="type">void</span> LineEdit<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">"My Menu Item"</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>
<p>The <i>event</i> parameter is used to obtain the position where
the mouse cursor was when the event was generated.</p>
<p><b>See also</b> <a href="qwidget.html#contextMenuPolicy-prop">setContextMenuPolicy</a>().</p>


<h3 class="fn"><a name="copy" />QLineEdit.copy (<i>self</i>)</h3><p>Copies the selected text to the clipboard, if there is any, and
if <a href="qlineedit.html#echoMode-prop">echoMode</a>() is
<a href="qlineedit.html#EchoMode-enum">Normal</a>.</p>
<p><b>See also</b> <a href="qlineedit.html#cut">cut</a>() and
<a href="qlineedit.html#paste">paste</a>().</p>


<h3 class="fn"><a name="createStandardContextMenu" /><a href="qmenu.html">QMenu</a> QLineEdit.createStandardContextMenu (<i>self</i>)</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="qlineedit.html#contextMenuEvent">contextMenuEvent</a>() handler.
The popup menu's ownership is transferred to the caller.</p>


<h3 class="fn"><a name="cursorBackward" />QLineEdit.cursorBackward (<i>self</i>, bool&#160;<i>mark</i>, int&#160;<i>steps</i>&#160;=&#160;1)</h3><p>Moves the cursor back <i>steps</i> characters. If <i>mark</i> is
true each character moved over is added to the selection; if
<i>mark</i> is false the selection is cleared.</p>
<p><b>See also</b> <a href="qlineedit.html#cursorForward">cursorForward</a>().</p>


<h3 class="fn"><a name="cursorForward" />QLineEdit.cursorForward (<i>self</i>, bool&#160;<i>mark</i>, int&#160;<i>steps</i>&#160;=&#160;1)</h3><p>Moves the cursor forward <i>steps</i> characters. If <i>mark</i>
is true each character moved over is added to the selection; if
<i>mark</i> is false the selection is cleared.</p>
<p><b>See also</b> <a href="qlineedit.html#cursorBackward">cursorBackward</a>().</p>


<h3 class="fn"><a name="cursorMoveStyle" /><a href="qt.html#CursorMoveStyle-enum">Qt.CursorMoveStyle</a> QLineEdit.cursorMoveStyle (<i>self</i>)</h3><h3 class="fn"><a name="cursorPosition" />int QLineEdit.cursorPosition (<i>self</i>)</h3><h3 class="fn"><a name="cursorPositionAt" />int QLineEdit.cursorPositionAt (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pos</i>)</h3><p>Returns the cursor position under the point <i>pos</i>.</p>


<h3 class="fn"><a name="cursorRect" /><a href="qrect.html">QRect</a> QLineEdit.cursorRect (<i>self</i>)</h3><p>Returns a rectangle that includes the lineedit cursor.</p>
<p>This function was introduced in Qt 4.4.</p>


<h3 class="fn"><a name="cursorWordBackward" />QLineEdit.cursorWordBackward (<i>self</i>, bool&#160;<i>mark</i>)</h3><p>Moves the cursor one word backward. If <i>mark</i> is true, the
word is also selected.</p>
<p><b>See also</b> <a href="qlineedit.html#cursorWordForward">cursorWordForward</a>().</p>


<h3 class="fn"><a name="cursorWordForward" />QLineEdit.cursorWordForward (<i>self</i>, bool&#160;<i>mark</i>)</h3><p>Moves the cursor one word forward. If <i>mark</i> is true, the
word is also selected.</p>
<p><b>See also</b> <a href="qlineedit.html#cursorWordBackward">cursorWordBackward</a>().</p>


<h3 class="fn"><a name="cut" />QLineEdit.cut (<i>self</i>)</h3><p>Copies the selected text to the clipboard and deletes it, if
there is any, and if <a href="qlineedit.html#echoMode-prop">echoMode</a>() is <a href="qlineedit.html#EchoMode-enum">Normal</a>.</p>
<p>If the current validator disallows deleting the selected text,
cut() will copy without deleting.</p>
<p><b>See also</b> <a href="qlineedit.html#copy">copy</a>(),
<a href="qlineedit.html#paste">paste</a>(), and <a href="qlineedit.html#setValidator">setValidator</a>().</p>


<h3 class="fn"><a name="del" />QLineEdit.del_ (<i>self</i>)</h3><p>If no text is selected, deletes the character to the right of
the text cursor. If any text is selected, the cursor is moved to
the beginning of the selected text and the selected text is
deleted.</p>
<p><b>See also</b> <a href="qlineedit.html#backspace">backspace</a>().</p>


<h3 class="fn"><a name="deselect" />QLineEdit.deselect (<i>self</i>)</h3><p>Deselects any selected text.</p>
<p><b>See also</b> <a href="qlineedit.html#setSelection">setSelection</a>() and <a href="qlineedit.html#selectAll">selectAll</a>().</p>


<h3 class="fn"><a name="displayText" />QString QLineEdit.displayText (<i>self</i>)</h3><h3 class="fn"><a name="dragEnabled" />bool QLineEdit.dragEnabled (<i>self</i>)</h3><h3 class="fn"><a name="dragEnterEvent" />QLineEdit.dragEnterEvent (<i>self</i>, <a href="qdragenterevent.html">QDragEnterEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#dragEnterEvent">QWidget.dragEnterEvent</a>().</p>


<h3 class="fn"><a name="dragLeaveEvent" />QLineEdit.dragLeaveEvent (<i>self</i>, <a href="qdragleaveevent.html">QDragLeaveEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#dragLeaveEvent">QWidget.dragLeaveEvent</a>().</p>


<h3 class="fn"><a name="dragMoveEvent" />QLineEdit.dragMoveEvent (<i>self</i>, <a href="qdragmoveevent.html">QDragMoveEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#dragMoveEvent">QWidget.dragMoveEvent</a>().</p>


<h3 class="fn"><a name="dropEvent" />QLineEdit.dropEvent (<i>self</i>, <a href="qdropevent.html">QDropEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget.dropEvent</a>().</p>


<h3 class="fn"><a name="echoMode" /><a href="qlineedit.html#EchoMode-enum">EchoMode</a> QLineEdit.echoMode (<i>self</i>)</h3><h3 class="fn"><a name="end" />QLineEdit.end (<i>self</i>, bool&#160;<i>mark</i>)</h3><p>Moves the text cursor to the end of the line unless it is
already there. If <i>mark</i> is true, text is selected towards the
last position; otherwise, any selected text is unselected if the
cursor is moved.</p>
<p><b>See also</b> <a href="qlineedit.html#home">home</a>().</p>


<h3 class="fn"><a name="event" />bool QLineEdit.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="focusInEvent" />QLineEdit.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget.focusInEvent</a>().</p>


<h3 class="fn"><a name="focusOutEvent" />QLineEdit.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget.focusOutEvent</a>().</p>


<h3 class="fn"><a name="getTextMargins" />(int&#160;<i>left</i>, int&#160;<i>top</i>, int&#160;<i>right</i>, int&#160;<i>bottom</i>) QLineEdit.getTextMargins (<i>self</i>)</h3><p>Returns the widget's text margins for <i>left</i>, <i>top</i>,
<i>right</i>, and <i>bottom</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qlineedit.html#setTextMargins">setTextMargins</a>().</p>


<h3 class="fn"><a name="hasAcceptableInput" />bool QLineEdit.hasAcceptableInput (<i>self</i>)</h3><h3 class="fn"><a name="hasFrame" />bool QLineEdit.hasFrame (<i>self</i>)</h3><h3 class="fn"><a name="hasSelectedText" />bool QLineEdit.hasSelectedText (<i>self</i>)</h3><h3 class="fn"><a name="home" />QLineEdit.home (<i>self</i>, bool&#160;<i>mark</i>)</h3><p>Moves the text cursor to the beginning of the line unless it is
already there. If <i>mark</i> is true, text is selected towards the
first position; otherwise, any selected text is unselected if the
cursor is moved.</p>
<p><b>See also</b> <a href="qlineedit.html#end">end</a>().</p>


<h3 class="fn"><a name="initStyleOption" />QLineEdit.initStyleOption (<i>self</i>, <a href="qstyleoptionframe.html">QStyleOptionFrame</a>&#160;<i>option</i>)</h3><p>Initialize <i>option</i> with the values from this <a href="qlineedit.html">QLineEdit</a>. This method is useful for
subclasses when they need a <a href="qstyleoptionframe.html">QStyleOptionFrame</a> or <a href="qstyleoptionframev2.html">QStyleOptionFrameV2</a>, but don't want
to fill in all the information themselves. This function will check
the version of the <a href="qstyleoptionframe.html">QStyleOptionFrame</a> and fill in the
additional values for a <a href="qstyleoptionframev2.html">QStyleOptionFrameV2</a>.</p>
<p><b>See also</b> <a href="qstyleoption.html#initFrom">QStyleOption.initFrom</a>().</p>


<h3 class="fn"><a name="inputMask" />QString QLineEdit.inputMask (<i>self</i>)</h3><h3 class="fn"><a name="inputMethodEvent" />QLineEdit.inputMethodEvent (<i>self</i>, <a href="qinputmethodevent.html">QInputMethodEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget.inputMethodEvent</a>().</p>


<h3 class="fn"><a name="inputMethodQuery" />QVariant QLineEdit.inputMethodQuery (<i>self</i>, <a href="qt.html#InputMethodQuery-enum">Qt.InputMethodQuery</a>)</h3><p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget.inputMethodQuery</a>().</p>


<h3 class="fn"><a name="insert" />QLineEdit.insert (<i>self</i>, QString)</h3><p>Deletes any selected text, inserts <i>newText</i>, and validates
the result. If it is valid, it sets it as the new contents of the
line edit.</p>
<p><b>See also</b> <a href="qlineedit.html#text-prop">setText</a>()
and <a href="qlineedit.html#clear">clear</a>().</p>


<h3 class="fn"><a name="isModified" />bool QLineEdit.isModified (<i>self</i>)</h3><h3 class="fn"><a name="isReadOnly" />bool QLineEdit.isReadOnly (<i>self</i>)</h3><h3 class="fn"><a name="isRedoAvailable" />bool QLineEdit.isRedoAvailable (<i>self</i>)</h3><h3 class="fn"><a name="isUndoAvailable" />bool QLineEdit.isUndoAvailable (<i>self</i>)</h3><h3 class="fn"><a name="keyPressEvent" />QLineEdit.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget.keyPressEvent</a>().</p>
<p>Converts the given key press <i>event</i> into a line edit
action.</p>
<p>If Return or Enter is pressed and the current text is valid (or
can be <a href="qvalidator.html#fixup">made valid</a> by the
validator), the signal <a href="qlineedit.html#returnPressed">returnPressed</a>() is emitted.</p>
<p>The default key bindings are listed in the class's detailed
description.</p>


<h3 class="fn"><a name="maxLength" />int QLineEdit.maxLength (<i>self</i>)</h3><h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QLineEdit.minimumSizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget.minimumSizeHint</a>().</p>
<p>Returns a minimum size for the line edit.</p>
<p>The width returned is enough for at least one character.</p>


<h3 class="fn"><a name="mouseDoubleClickEvent" />QLineEdit.mouseDoubleClickEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mouseDoubleClickEvent">QWidget.mouseDoubleClickEvent</a>().</p>


<h3 class="fn"><a name="mouseMoveEvent" />QLineEdit.mouseMoveEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget.mouseMoveEvent</a>().</p>


<h3 class="fn"><a name="mousePressEvent" />QLineEdit.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget.mousePressEvent</a>().</p>


<h3 class="fn"><a name="mouseReleaseEvent" />QLineEdit.mouseReleaseEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget.mouseReleaseEvent</a>().</p>


<h3 class="fn"><a name="paintEvent" />QLineEdit.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p>


<h3 class="fn"><a name="paste" />QLineEdit.paste (<i>self</i>)</h3><p>Inserts the clipboard's text at the cursor position, deleting
any selected text, providing the line edit is not <a href="qlineedit.html#readOnly-prop">read-only</a>.</p>
<p>If the end result would not be acceptable to the current
<a href="qlineedit.html#setValidator">validator</a>, nothing
happens.</p>
<p><b>See also</b> <a href="qlineedit.html#copy">copy</a>() and
<a href="qlineedit.html#cut">cut</a>().</p>


<h3 class="fn"><a name="placeholderText" />QString QLineEdit.placeholderText (<i>self</i>)</h3><h3 class="fn"><a name="redo" />QLineEdit.redo (<i>self</i>)</h3><p>Redoes the last operation if redo is <a href="qlineedit.html#redoAvailable-prop">available</a>.</p>


<h3 class="fn"><a name="selectAll" />QLineEdit.selectAll (<i>self</i>)</h3><p>Selects all the text (i.e. highlights it) and moves the cursor
to the end. This is useful when a default value has been inserted
because if the user types before clicking on the widget, the
selected text will be deleted.</p>
<p><b>See also</b> <a href="qlineedit.html#setSelection">setSelection</a>() and <a href="qlineedit.html#deselect">deselect</a>().</p>


<h3 class="fn"><a name="selectedText" />QString QLineEdit.selectedText (<i>self</i>)</h3><h3 class="fn"><a name="selectionStart" />int QLineEdit.selectionStart (<i>self</i>)</h3><p>selectionStart() returns the index of the first selected
character in the line edit or -1 if no text is selected.</p>
<p><b>See also</b> <a href="qlineedit.html#selectedText-prop">selectedText</a>().</p>


<h3 class="fn"><a name="setAlignment" />QLineEdit.setAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>flag</i>)</h3><h3 class="fn"><a name="setCompleter" />QLineEdit.setCompleter (<i>self</i>, <a href="qcompleter.html">QCompleter</a>&#160;<i>completer</i>)</h3><p>Sets this line edit to provide auto completions from the
completer, <i>c</i>. The completion mode is set using <a href="qcompleter.html#completionMode-prop">QCompleter.setCompletionMode</a>().</p>
<p>To use a <a href="qcompleter.html">QCompleter</a> with a
<a href="qvalidator.html">QValidator</a> or <a href="qlineedit.html#inputMask-prop">QLineEdit.inputMask</a>, you need
to ensure that the model provided to <a href="qcompleter.html">QCompleter</a> contains valid entries. You can
use the <a href="qsortfilterproxymodel.html">QSortFilterProxyModel</a> to ensure
that the <a href="qcompleter.html">QCompleter</a>'s model contains
only valid entries.</p>
<p>If <i>c</i> == 0, setCompleter() removes the current completer,
effectively disabling auto completion.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qlineedit.html#completer">completer</a>() and <a href="qcompleter.html">QCompleter</a>.</p>


<h3 class="fn"><a name="setCursorMoveStyle" />QLineEdit.setCursorMoveStyle (<i>self</i>, <a href="qt.html#CursorMoveStyle-enum">Qt.CursorMoveStyle</a>&#160;<i>style</i>)</h3><h3 class="fn"><a name="setCursorPosition" />QLineEdit.setCursorPosition (<i>self</i>, int)</h3><h3 class="fn"><a name="setDragEnabled" />QLineEdit.setDragEnabled (<i>self</i>, bool&#160;<i>b</i>)</h3><h3 class="fn"><a name="setEchoMode" />QLineEdit.setEchoMode (<i>self</i>, <a href="qlineedit.html#EchoMode-enum">EchoMode</a>)</h3><h3 class="fn"><a name="setFrame" />QLineEdit.setFrame (<i>self</i>, bool)</h3><h3 class="fn"><a name="setInputMask" />QLineEdit.setInputMask (<i>self</i>, QString&#160;<i>inputMask</i>)</h3><h3 class="fn"><a name="setMaxLength" />QLineEdit.setMaxLength (<i>self</i>, int)</h3><h3 class="fn"><a name="setModified" />QLineEdit.setModified (<i>self</i>, bool)</h3><h3 class="fn"><a name="setPlaceholderText" />QLineEdit.setPlaceholderText (<i>self</i>, QString)</h3><h3 class="fn"><a name="setReadOnly" />QLineEdit.setReadOnly (<i>self</i>, bool)</h3><h3 class="fn"><a name="setSelection" />QLineEdit.setSelection (<i>self</i>, int, int)</h3><p>Selects text from position <i>start</i> and for <i>length</i>
characters. Negative lengths are allowed.</p>
<p><b>See also</b> <a href="qlineedit.html#deselect">deselect</a>(), <a href="qlineedit.html#selectAll">selectAll</a>(), and <a href="qlineedit.html#selectedText-prop">selectedText</a>().</p>


<h3 class="fn"><a name="setText" />QLineEdit.setText (<i>self</i>, QString)</h3><h3 class="fn"><a name="setTextMargins" />QLineEdit.setTextMargins (<i>self</i>, int&#160;<i>left</i>, int&#160;<i>top</i>, int&#160;<i>right</i>, int&#160;<i>bottom</i>)</h3><p>Sets the margins around the text inside the frame to have the
sizes <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>.</p>
<p>See also <a href="qlineedit.html#getTextMargins">getTextMargins</a>().</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qlineedit.html#textMargins">textMargins</a>().</p>


<h3 class="fn"><a name="setTextMargins-2" />QLineEdit.setTextMargins (<i>self</i>, <a href="qmargins.html">QMargins</a>&#160;<i>margins</i>)</h3><p>Sets the <i>margins</i> around the text inside the frame.</p>
<p>See also <a href="qlineedit.html#textMargins">textMargins</a>().</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="setValidator" />QLineEdit.setValidator (<i>self</i>, <a href="qvalidator.html">QValidator</a>)</h3><p>Sets this line edit to only accept input that the validator,
<i>v</i>, will accept. This allows you to place any arbitrary
constraints on the text which may be entered.</p>
<p>If <i>v</i> == 0, setValidator() removes the current input
validator. The initial setting is to have no input validator (i.e.
any input is accepted up to <a href="qlineedit.html#maxLength-prop">maxLength</a>()).</p>
<p><b>See also</b> <a href="qlineedit.html#validator">validator</a>(), <a href="qintvalidator.html">QIntValidator</a>, <a href="qdoublevalidator.html">QDoubleValidator</a>, and <a href="qregexpvalidator.html">QRegExpValidator</a>.</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QLineEdit.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>
<p>Returns a recommended size for the widget.</p>
<p>The width returned, in pixels, is usually enough for about 15 to
20 characters.</p>


<h3 class="fn"><a name="text" />QString QLineEdit.text (<i>self</i>)</h3><h3 class="fn"><a name="textMargins" /><a href="qmargins.html">QMargins</a> QLineEdit.textMargins (<i>self</i>)</h3><p>Returns the widget's text margins.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qlineedit.html#setTextMargins">setTextMargins</a>().</p>


<h3 class="fn"><a name="undo" />QLineEdit.undo (<i>self</i>)</h3><p>Undoes the last operation if undo is <a href="qlineedit.html#undoAvailable-prop">available</a>. Deselects any
current selection, and updates the selection start to the current
cursor position.</p>


<h3 class="fn"><a name="validator" /><a href="qvalidator.html">QValidator</a> QLineEdit.validator (<i>self</i>)</h3><p>Returns a pointer to the current input validator, or 0 if no
validator has been set.</p>
<p><b>See also</b> <a href="qlineedit.html#setValidator">setValidator</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="cursorPositionChanged" />void cursorPositionChanged (int,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the cursor moves. The previous
position is given by <i>old</i>, and the new position by
<i>new</i>.</p>
<p><b>See also</b> <a href="qlineedit.html#cursorPosition-prop">setCursorPosition</a>() and
<a href="qlineedit.html#cursorPosition-prop">cursorPosition</a>().</p>


<h3 class="fn"><a name="editingFinished" />void editingFinished ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the Return or Enter key is pressed
or the line edit loses focus. Note that if there is a <a href="qlineedit.html#validator">validator</a>() or <a href="qlineedit.html#inputMask-prop">inputMask</a>() set on the line
edit and enter/return is pressed, the editingFinished() signal will
only be emitted if the input follows the <a href="qlineedit.html#inputMask-prop">inputMask</a>() and the <a href="qlineedit.html#validator">validator</a>() returns <a href="qvalidator.html#State-enum">QValidator.Acceptable</a>.</p>


<h3 class="fn"><a name="returnPressed" />void returnPressed ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the Return or Enter key is pressed.
Note that if there is a <a href="qlineedit.html#validator">validator</a>() or <a href="qlineedit.html#inputMask-prop">inputMask</a>() set on the line
edit, the returnPressed() signal will only be emitted if the input
follows the <a href="qlineedit.html#inputMask-prop">inputMask</a>()
and the <a href="qlineedit.html#validator">validator</a>() returns
<a href="qvalidator.html#State-enum">QValidator.Acceptable</a>.</p>


<h3 class="fn"><a name="selectionChanged" />void selectionChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the selection changes.</p>
<p><b>See also</b> <a href="qlineedit.html#hasSelectedText-prop">hasSelectedText</a>() and
<a href="qlineedit.html#selectedText-prop">selectedText</a>().</p>


<h3 class="fn"><a name="textChanged" />void textChanged (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the text changes. The
<i>text</i> argument is the new text.</p>
<p>Unlike <a href="qlineedit.html#textEdited">textEdited</a>(),
this signal is also emitted when the text is changed
programmatically, for example, by calling <a href="qlineedit.html#text-prop">setText</a>().</p>


<h3 class="fn"><a name="textEdited" />void textEdited (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the text is edited. The
<i>text</i> argument is the new text.</p>
<p>Unlike <a href="qlineedit.html#textChanged">textChanged</a>(),
this signal is not emitted when the text is changed
programmatically, for example, by calling <a href="qlineedit.html#text-prop">setText</a>().</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>