以下成员源于类 QTextEdit are part of the Qt compatibility layer. We advise against using them in new code.
| enum | CursorAction { MoveBackward, MoveForward, MoveWordBackward, MoveWordForward, ..., MovePageDown } |
| enum | KeyboardAction { ActionBackspace, ActionDelete, ActionReturn, ActionKill, ActionWordBackspace, ActionWordDelete } |
| QTextEdit (QWidget * parent , const char * name ) | |
| bool | bold () const |
| QColor | color () const |
| void | doKeyboardAction (KeyboardAction action ) |
| QString | family () const |
| bool | find (const QString & exp , bool cs , bool wo ) |
| bool | hasSelectedText () const |
| void | insert (const QString & text ) |
| bool | isModified () const |
| bool | isRedoAvailable () const |
| bool | isUndoAvailable () const |
| bool | italic () const |
| void | moveCursor (CursorAction action , QTextCursor::MoveMode mode = QTextCursor::MoveAnchor) |
| void | moveCursor (CursorAction action , bool select ) |
| int | pointSize () const |
| void | redo () const |
| QString | selectedText () const |
| void | setBold (bool b ) |
| void | setFamily (const QString & family ) |
| void | setItalic (bool i ) |
| void | setPointSize (int size ) |
| void | setTextFormat (Qt::TextFormat f ) |
| void | setUnderline (bool b ) |
| void | sync () |
| QString | text () const |
| Qt::TextFormat | textFormat () const |
| bool | underline () const |
| void | undo () const |
| void | setColor (const QColor & color ) |
| void | setModified (bool m = true) |
| void | currentColorChanged (const QColor & color ) |
| void | currentFontChanged (const QFont & font ) |
| 常量 | 值 |
|---|---|
QTextEdit::MoveBackward
|
0
|
QTextEdit::MoveForward
|
1
|
QTextEdit::MoveWordBackward
|
2
|
QTextEdit::MoveWordForward
|
3
|
QTextEdit::MoveUp
|
4
|
QTextEdit::MoveDown
|
5
|
QTextEdit::MoveLineStart
|
6
|
QTextEdit::MoveLineEnd
|
7
|
QTextEdit::MoveHome
|
8
|
QTextEdit::MoveEnd
|
9
|
QTextEdit::MovePageUp
|
10
|
QTextEdit::MovePageDown
|
11
|
| 常量 | 值 |
|---|---|
QTextEdit::ActionBackspace
|
0
|
QTextEdit::ActionDelete
|
1
|
QTextEdit::ActionReturn
|
2
|
QTextEdit::ActionKill
|
3
|
QTextEdit::ActionWordBackspace
|
4
|
QTextEdit::ActionWordDelete
|
5
|
Use one of the constructors that doesn't take the name argument and then use setObjectName () 代替。
使用 fontWeight () >= QFont::Bold 代替。
另请参阅 setBold ().
使用 textColor () 代替。
另请参阅 setColor ().
[signal]
void
QTextEdit::
currentColorChanged
(const
QColor
&
color
)
使用 currentCharFormatChanged () 代替。
[signal]
void
QTextEdit::
currentFontChanged
(const
QFont
&
font
)
使用 currentCharFormatChanged () 代替。
Executes keyboard action action .
使用 QTextCursor class instead.
另请参阅 textCursor ().
使用 fontFamily () 代替。
另请参阅 setFamily ().
使用 find () 重载接受 QTextDocument::FindFlags 自变量。
使用 textCursor ().hasSelection() instead.
使用 insertPlainText () 代替。
使用 document ()->isModified() instead.
使用 document ()->isRedoAvailable() instead.
使用 document ()->isUndoAvailable() instead.
使用 fontItalic () 代替。
另请参阅 setItalic ().
使用 QTextCursor class instead.
使用 QTextCursor class instead.
Use int( fontPointSize ()+0.5) instead.
另请参阅 setPointSize ().
这是重载函数。
Use the non-const overload instead.
使用 textCursor ().selectedText() instead.
使用 setFontWeight () 代替。
另请参阅 bold ().
[slot]
void
QTextEdit::
setColor
(const
QColor
&
color
)
使用 setTextColor () 代替。
另请参阅 color ().
使用 setFontFamily () 代替。
另请参阅 family ().
使用 setFontItalic () 代替。
另请参阅 italic ().
[slot]
void
QTextEdit::
setModified
(
bool
m
= true)
Use document->setModified() instead.
另请参阅 isModified ().
使用 setFontPointSize () 代替。
另请参阅 pointSize ().
Sets the text format to format f .
另请参阅 textFormat ().
使用 setFontUnderline () 代替。
另请参阅 underline ().
什么都不做。
Returns all the text in the text edit as plain text.
另请参阅 setText ().
Returns the text format.
另请参阅 setTextFormat ().
使用 fontUnderline () 代替。
另请参阅 setUnderline ().
这是重载函数。
Use the non-const overload instead.