
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
The following members of classQTextEditare 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) |
| Constant | Value |
|---|---|
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 |
| Constant | Value |
|---|---|
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 thename argument and then usesetObjectName() instead.
UsefontWeight() >=QFont::Bold instead.
See alsosetBold().
UsetextColor() instead.
See alsosetColor().
[signal]void QTextEdit::currentColorChanged(constQColor & color)UsecurrentCharFormatChanged() instead.
[signal]void QTextEdit::currentFontChanged(constQFont & font)UsecurrentCharFormatChanged() instead.
Executes keyboard actionaction.
Use theQTextCursor class instead.
See alsotextCursor().
UsefontFamily() instead.
See alsosetFamily().
Use thefind() overload that takes aQTextDocument::FindFlags argument.
UsetextCursor().hasSelection() instead.
UseinsertPlainText() instead.
Usedocument()->isModified() instead.
Usedocument()->isRedoAvailable() instead.
Usedocument()->isUndoAvailable() instead.
UsefontItalic() instead.
See alsosetItalic().
Use theQTextCursor class instead.
Use theQTextCursor class instead.
Use int(fontPointSize()+0.5) instead.
See alsosetPointSize().
This is an overloaded function.
Use the non-const overload instead.
UsetextCursor().selectedText() instead.
UsesetFontWeight() instead.
See alsobold().
[slot]void QTextEdit::setColor(constQColor & color)UsesetTextColor() instead.
See alsocolor().
UsesetFontFamily() instead.
See alsofamily().
UsesetFontItalic() instead.
See alsoitalic().
[slot]void QTextEdit::setModified(bool m = true)Use document->setModified() instead.
See alsoisModified().
UsesetFontPointSize() instead.
See alsopointSize().
Sets the text format to formatf.
See alsotextFormat().
UsesetFontUnderline() instead.
See alsounderline().
Does nothing.
Returns all the text in the text edit as plain text.
See alsosetText().
Returns the text format.
See alsosetTextFormat().
UsefontUnderline() instead.
See alsosetUnderline().
This is an overloaded function.
Use the non-const overload instead.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.