The text is set or replaced using setPlainText() which deletes the existing text and replaces it with the text passed to setPlainText(). It can be changed through the viewport()'s cursor property. The shape of the mouse cursor on a QPlainTextEdit is Qt::IBeamCursor by default. Each character within a paragraph has its own attributes, for example, font and color. Paragraphs are separated by hard line breaks. A document consists of zero or more paragraphs. By default when reading plain text, one newline signifies a paragraph. A paragraph is a formatted string which is word-wrapped to fit into the width of the widget. QPlainTextEdit works on paragraphs and characters. QPlainText uses very much the same technology and concepts as QTextEdit, but is optimized for plain text handling. It is optimized to handle large documents and to respond quickly to user input. QPlainTextEdit is an advanced viewer/editor supporting plain text. ScrollContentsBy(int dx, int dy) overrideĭetailed Description Introduction and Concepts MouseReleaseEvent(QMouseEvent * e) override MousePressEvent(QMouseEvent * e) override MouseDoubleClickEvent(QMouseEvent * e) override InputMethodEvent(QInputMethodEvent * e) override SetWordWrapMode(QTextOption::WrapMode policy)ĬontextMenuEvent(QContextMenuEvent * event) overrideĭragEnterEvent(QDragEnterEvent * e) overrideĭragLeaveEvent(QDragLeaveEvent * e) overrideĭragMoveEvent(QDragMoveEvent * e) override SetTextInteractionFlags(Qt::TextInteractionFlags flags) SetTextCursor(const QTextCursor & cursor) SetPlaceholderText(const QString & placeholderText) SetLineWrapMode(QPlainTextEdit::LineWrapMode mode) SetExtraSelections(const QList & selections) SetCurrentCharFormat(const QTextCharFormat & format) MoveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor) MergeCurrentCharFormat(const QTextCharFormat & modifier) LoadResource(int type, const QUrl & name) QPlainTextEdit(QWidget * parent = nullptr)ĬreateStandardContextMenu(const QPoint & position)ĬursorForPosition(const QPoint & pos) constĬursorRect(const QTextCursor & cursor) constįind(const QString & exp, QTextDocument::FindFlags options = QTextDocument::FindFlags())įind(const QRegExp & exp, QTextDocument::FindFlags options = QTextDocument::FindFlags())įind(const QRegularExpression & exp, QTextDocument::FindFlags options = QTextDocument::FindFlags()) QPlainTextEdit(const QString & text, QWidget * parent = nullptr)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |