以下成員源於類 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.