The QPlainTextEdit class provides a widget that is used to edit and display plain text. More...
#include <QPlainTextEdit>
Inherits QAbstractScrollArea.
This class was introduced in Qt 4.4..:
This property holds the number of text blocks in the document.
By default, in an empty document, this property contains a value of 1.
Access functions:().
This property specifies the width of the cursor in pixels. The default value is 1.
Access functions:
This property holds the title of the document parsed from the text.
By default, this property contains an empty string.
Access functions::
This property gets and sets the plain text editor's contents. The previous contents are removed and undo/redo history is reset when this property is set.
By default, for an editor with no contents, this property contains an empty string.
Access functions:
Notifier signal:.
Access functions:, and whether it is a QTextBrowser or not.
Access functions:
This property holds whether undo and redo are enabled.
Users are only able to undo or redo actions if this property is true, and if there is an action that can be undone (or redone).
By default, this property is true.
Access functions:
This property holds the mode QPlainTextEdit will use when wrapping text by words.
By default, this property is set to QTextOption::WrapAtWordBoundaryOrAnywhere.
Access functions:
See also QTextOption::WrapMode.
Constructs an empty QPlainTextEdit with parent parent.
Constructs a QPlainTextEdit with parent parent. The text edit will display the plain text text.
Destructor.
Appends a new paragraph with html to the end of the text edit.
appendPlainText()().
This signal is emitted whenever the block count changes. The new block count is passed in newBlockCount..
Returns whether text can be pasted from the clipboard into the textedit.
Scrolls the document in order to center the cursor vertically.
See also ensureCursorVisible() and centerOnScroll.
Reimplemented from QWidget::changeEvent().
Deletes all the text in the text edit.
Note that the undo/redo history is cleared by this function.
See also cut() and setPlainText().().
returns a QTextCursor at position pos (in viewport coordinates).
This signal is emitted whenever the position of the cursor changed.
returns a rectangle (in viewport coordinates) that includes the cursor.().()..
See also QTextDocument::print().
Redoes the last operation.
If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens.
See also undo().
This signal is emitted whenever redo operations become available (available is true) or unavailable (available is false).
Reimplemented from QWidget::resizeEvent().
Reimplemented from QAbstractScrollArea::scrollContentsBy().
Selects all text.
See also copy(), cut(), and textCursor().
This signal is emitted whenever the selection changes.
See also copyAvailable(). visible cursor.
See also textCursor().
Reimplemented from QWidget::showEvent().
This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied.
Returns a copy of the QTextCursor that represents the currently visible cursor. Note that changes on the returned cursor do not affect QPlainTextEdit's cursor; use setTextCursor() to update the visible cursor.
See also setTextCursor().
Undoes the last operation.
If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.
See also redo().
This signal is emitted whenever undo operations become available (available is true) or unavailable (available is false)..
Reimplemented from QWidget::wheelEvent().