📄 qtmultilineedit.html
字号:
See the <a href="qtmultilineedit.html#text-prop">"text"</a> property for details.<h3 class=fn>void <a name="setUndoDepth"></a>QtMultiLineEdit::setUndoDepth ( int )</h3><p>Sets the undo depth.See the <a href="qtmultilineedit.html#undoDepth-prop">"undoDepth"</a> property for details.<h3 class=fn>void <a name="setUndoEnabled"></a>QtMultiLineEdit::setUndoEnabled ( bool )</h3><p>Sets whether undo is enabled.See the <a href="qtmultilineedit.html#undoEnabled-prop">"undoEnabled"</a> property for details.<h3 class=fn>void <a name="setValidator"></a>QtMultiLineEdit::setValidator ( const <a href="qvalidator.html">QValidator</a> * v )<tt> [virtual]</tt></h3>Not supported at this time.<em>v</em> is the validator to set.<h3 class=fn>void <a name="setWordWrap"></a>QtMultiLineEdit::setWordWrap ( <a href="qtmultilineedit.html#WordWrap-enum">WordWrap</a> mode )</h3><p>Sets the word wrap mode to <em>mode</em>.See the <a href="qtmultilineedit.html#wordWrap-prop">"wordWrap"</a> property for details.<h3 class=fn>void <a name="setWrapColumnOrWidth"></a>QtMultiLineEdit::setWrapColumnOrWidth ( int )</h3><p>Sets the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode.See the <a href="qtmultilineedit.html#wrapColumnOrWidth-prop">"wrapColumnOrWidth"</a> property for details.<h3 class=fn>void <a name="setWrapPolicy"></a>QtMultiLineEdit::setWrapPolicy ( <a href="qtmultilineedit.html#WrapPolicy-enum">WrapPolicy</a> policy )</h3><p>Sets the wrap policy mode The default is <a href="#WrapPolicy-enum">AtWhiteSpace</a> to <em>policy</em>.See the <a href="qtmultilineedit.html#wrapPolicy-prop">"wrapPolicy"</a> property for details.<h3 class=fn><a href="qstring.html">QString</a> <a name="stringShown"></a>QtMultiLineEdit::stringShown ( int row ) const<tt> [protected]</tt></h3>Returns the string shown at line <em>row</em>, includingprocessing of the <a href="#echoMode">echoMode</a>().<h3 class=fn><a href="qstring.html">QString</a> <a name="text"></a>QtMultiLineEdit::text () const</h3><p>Returns the multi-line edit's text.See the <a href="qtmultilineedit.html#text-prop">"text"</a> property for details.<h3 class=fn>void <a name="textChanged"></a>QtMultiLineEdit::textChanged ()<tt> [signal]</tt></h3> <p> This signal is emitted when the text is changed by an event or by aslot. Note that the signal is not emitted when you call a non-slotfunction such as <a href="#insertLine">insertLine</a>().<p> <p>See also <a href="#returnPressed">returnPressed</a>().<h3 class=fn><a href="qstring.html">QString</a> <a name="textLine"></a>QtMultiLineEdit::textLine ( int line ) const</h3>Returns the text at line number <em>line</em> (possibly the empty string),or a <a href="qstring.html#operator!">null string</a> if <em>line</em> is invalid.<h3 class=fn>int <a name="textWidth"></a>QtMultiLineEdit::textWidth ( int line )<tt> [protected]</tt></h3>Returns the width in pixels of the text at line <em>line</em>.<h3 class=fn>int <a name="textWidth-2"></a>QtMultiLineEdit::textWidth ( const <a href="qstring.html">QString</a> & s )<tt> [protected]</tt></h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Returns the width in pixels of the string <em>s</em>.NOTE: only appropriate for whole lines.<h3 class=fn>void <a name="undo"></a>QtMultiLineEdit::undo ()<tt> [slot]</tt></h3>Undoes the last text operation.<h3 class=fn>void <a name="undoAvailable"></a>QtMultiLineEdit::undoAvailable ( bool yes )<tt> [signal]</tt></h3><p> This signal is emitted when the availability of undo changes.If <em>yes</em> is TRUE, then <a href="#undo">undo</a>() will work until<a href="#undoAvailable">undoAvailable</a>( FALSE ) is next emitted.<h3 class=fn>int <a name="undoDepth"></a>QtMultiLineEdit::undoDepth () const</h3><p>Returns the undo depth.See the <a href="qtmultilineedit.html#undoDepth-prop">"undoDepth"</a> property for details.<h3 class=fn>const <a href="qvalidator.html">QValidator</a> * <a name="validator"></a>QtMultiLineEdit::validator () const</h3>Not supported at this time.<h3 class=fn><a href="qtmultilineedit.html#WordWrap-enum">WordWrap</a> <a name="wordWrap"></a>QtMultiLineEdit::wordWrap () const</h3><p>Returns the word wrap mode.See the <a href="qtmultilineedit.html#wordWrap-prop">"wordWrap"</a> property for details.<h3 class=fn>int <a name="wrapColumnOrWidth"></a>QtMultiLineEdit::wrapColumnOrWidth () const</h3><p>Returns the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode.See the <a href="qtmultilineedit.html#wrapColumnOrWidth-prop">"wrapColumnOrWidth"</a> property for details.<h3 class=fn><a href="qtmultilineedit.html#WrapPolicy-enum">WrapPolicy</a> <a name="wrapPolicy"></a>QtMultiLineEdit::wrapPolicy () const</h3><p>Returns the wrap policy mode The default is <a href="#WrapPolicy-enum">AtWhiteSpace</a>.See the <a href="qtmultilineedit.html#wrapPolicy-prop">"wrapPolicy"</a> property for details.<hr><h2>Property Documentation</h2><h3 class=fn>Alignment <a name="alignment-prop"></a>alignment</h3><p>This property holds the alignment.<p>Possible values are <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>, <tt>Align(H)Center</tt> and <a href="qt.html#AlignmentFlags-enum">AlignRight</a>.<p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>.<p>Set this property's value with <a href="#setAlignment">setAlignment</a>() and get this property's value with <a href="#alignment">alignment</a>().<h3 class=fn>bool <a name="atBeginning-prop"></a>atBeginning</h3><p>This property holds whether the cursor is at the beginning.<p>atBeginning() returns TRUE if the cursor is placed at thebeginning of the text.<p>Get this property's value with <a href="#atBeginning">atBeginning</a>().<h3 class=fn>bool <a name="atEnd-prop"></a>atEnd</h3><p>This property holds whether the cursor is at the end.<p>atEnd() returns TRUE if the cursor is placed at the end of the text.<p>Get this property's value with <a href="#atEnd">atEnd</a>().<h3 class=fn>bool <a name="autoUpdate-prop"></a>autoUpdate</h3><p>This property holds whether auto update is enabled.<p>autoUpdate() returns TRUE if the view updates itself automaticallywhenever it is changed in some way.<p> If <a href="#autoUpdate">autoUpdate</a>() is TRUE (this is the default) then the editor updatesitself automatically whenever it has changed in some way (generally,when text has been inserted or deleted).<p> If autoUpdate() is FALSE, the view does NOT repaint itself, or updateits internal state variables itself when it is changed. This can beuseful to avoid flicker during large changes, and is singularlyuseless otherwise: Disable auto-update, do the changes, re-enableauto-update, and call <a href="qttableview.html#repaint">repaint</a>().<p> <b>Warning:</b> Do not leave the view in this state for a long time(i.e. between events ). If, for example, the user interacts with theview when auto-update is off, strange things can happen.<p> Setting auto-update to TRUE does not repaint the view, you must callrepaint() to do this (preferable repaint(FALSE) to avoid flicker).<p> <p>See also <a href="qttableview.html#repaint">repaint</a>().<p> <p>Set this property's value with <a href="#setAutoUpdate">setAutoUpdate</a>() and get this property's value with <a href="#autoUpdate">autoUpdate</a>().<h3 class=fn><a href="qtmultilineedit.html#EchoMode-enum">EchoMode</a> <a name="echoMode-prop"></a>echoMode</h3><p>This property holds the echo mode.<p><p>Set this property's value with <a href="#setEchoMode">setEchoMode</a>() and get this property's value with <a href="#echoMode">echoMode</a>().<h3 class=fn>bool <a name="edited-prop"></a>edited</h3><p>This property holds whether the text had been edited.<p>edited() returns the edited flag of the line edit. If this returns FALSE,the contents has not been changed since the construction of theQtMultiLineEdit (or the last call to <a href="#setEdited">setEdited</a>( FALSE ), if any). Ifit returns TRUE, the contents have been edited, or setEdited( TRUE )has been called.<p> setEdited() sets the edited flag of this line edit to <em>e</em>. Theedited flag is never read by QtMultiLineEdit, but is changed to TRUEwhenever the user changes its contents.<p> This is useful e.g. for things that need to provide a default value,but cannot find the default at once. Just open the widget without thebest default and when the default is known, check the <a href="#edited">edited</a>() returnvalue and set the line edit's contents if the user has not startedediting the line edit. Another example is to detect whether thecontents need saving.<p> <p>Set this property's value with <a href="#setEdited">setEdited</a>() and get this property's value with <a href="#edited">edited</a>().<h3 class=fn>int <a name="hMargin-prop"></a>hMargin</h3><p>This property holds the horizontal margin The horizontal margin current set. The default is 3.<p><p>Set this property's value with <a href="#setHMargin">setHMargin</a>() and get this property's value with <a href="#hMargin">hMargin</a>().<h3 class=fn>int <a name="length-prop"></a>length</h3><p>This property holds the length of the text.<p><p>Get this property's value with <a href="#length">length</a>().<h3 class=fn>int <a name="maxLength-prop"></a>maxLength</h3><p>This property holds the maximum length of the text.<p>The currently set text length limit, or -1 if there isno limit (this is the default).<p> <p>Set this property's value with <a href="#setMaxLength">setMaxLength</a>() and get this property's value with <a href="#maxLength">maxLength</a>().<h3 class=fn>int <a name="maxLineWidth-prop"></a>maxLineWidth</h3><p>This property holds the maximum line width in pixels Returns the width in pixels of the longest text line in this editor.<p><p>Get this property's value with <a href="#maxLineWidth">maxLineWidth</a>().<h3 class=fn>int <a name="maxLines-prop"></a>maxLines</h3><p>This property holds the maximum number of lines The currently set line limit, or -1 if there is no limit (the default).<p>Note that excess lines are deleted from the <em>bottom</em> of thelines. If you want teletype behaviour with lines disappearingfrom the <em>top</em> as the limit is exceed, you probably just wantto use <a href="#removeLine">removeLine</a>(0) prior to adding an excess line.<p> <p>Set this property's value with <a href="#setMaxLines">setMaxLines</a>() and get this property's value with <a href="#maxLines">maxLines</a>().<h3 class=fn>int <a name="numLines-prop"></a>numLines</h3><p>This property holds the number of lines in the multi-line edit.<p>numLines() returns the number of lines in the editor. The countincludes any empty lines at top and bottom, so for an empty editorthis method will return 1.<p>Get this property's value with <a href="#numLines">numLines</a>().<h3 class=fn>bool <a name="overWriteMode-prop"></a>overWriteMode</h3><p>This property holds the overwrite mode.<p><p>Set this property's value with <a href="#setOverwriteMode">setOverwriteMode</a>() and get this property's value with <a href="#isOverwriteMode">isOverwriteMode</a>().<h3 class=fn>bool <a name="readOnly-prop"></a>readOnly</h3><p>This property holds whether the multi-line edit is read-only.<p><p>Set this property's value with <a href="#setReadOnly">setReadOnly</a>() and get this property's value with <a href="#isReadOnly">isReadOnly</a>().<h3 class=fn><a href="qstring.html">QString</a> <a name="text-prop"></a>text</h3><p>This property holds the multi-line edit's text.<p><p>Set this property's value with <a href="#setText">setText</a>() and get this property's value with <a href="#text">text</a>().<h3 class=fn>int <a name="undoDepth-prop"></a>undoDepth</h3><p>This property holds the undo depth.<p>The maximum number of operations that can be stored on the undo stack.<p> <p>See also <a href="#undoDepth-prop">undoDepth</a>.<p>Set this property's value with <a href="#setUndoDepth">setUndoDepth</a>() and get this property's value with <a href="#undoDepth">undoDepth</a>().<h3 class=fn>bool <a name="undoEnabled-prop"></a>undoEnabled</h3><p>This property holds whether undo is enabled.<p><p>Set this property's value with <a href="#setUndoEnabled">setUndoEnabled</a>() and get this property's value with <a href="#isUndoEnabled">isUndoEnabled</a>().<h3 class=fn><a href="qtmultilineedit.html#WordWrap-enum">WordWrap</a> <a name="wordWrap-prop"></a>wordWrap</h3><p>This property holds the word wrap mode.<p>By default, wrapping keeps words intact. To allow breaking withinwords, set the wrap policy to <a href="#WrapPolicy-enum">Anywhere</a> (see <a href="#setWrapPolicy">setWrapPolicy</a>() ).<p> The default wrap mode is <a href="#WordWrap-enum">NoWrap</a>.<p> <p>See also <a href="#wrapColumnOrWidth-prop">wrapColumnOrWidth</a> and <a href="#wrapPolicy-prop">wrapPolicy</a>.<p>Set this property's value with <a href="#setWordWrap">setWordWrap</a>() and get this property's value with <a href="#wordWrap">wordWrap</a>().<h3 class=fn>int <a name="wrapColumnOrWidth-prop"></a>wrapColumnOrWidth</h3><p>This property holds the wrap width in columns or pixels The wrap column or wrap width, depending on the word wrap mode.<p>Set this property's value with <a href="#setWrapColumnOrWidth">setWrapColumnOrWidth</a>() and get this property's value with <a href="#wrapColumnOrWidth">wrapColumnOrWidth</a>().<p><p>See also <a href="#wordWrap-prop">wordWrap</a> and <a href="#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>.<h3 class=fn><a href="qtmultilineedit.html#WrapPolicy-enum">WrapPolicy</a> <a name="wrapPolicy-prop"></a>wrapPolicy</h3><p>This property holds the wrap policy mode The default is <a href="#WrapPolicy-enum">AtWhiteSpace</a>.<p><p>Set this property's value with <a href="#setWrapPolicy">setWrapPolicy</a>() and get this property's value with <a href="#wrapPolicy">wrapPolicy</a>().<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright © 1995-2002<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright © 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -