Used to edit and display plain text.
This class is a JS wrapper around Qt's QPlainTextEdit class
A QPlainTextEdit provides ability to add and manipulate native editable text field widgets.
QPlainTextEdit inherits from NodeWidget
Example
const { QPlainTextEdit } = require("@nodegui/nodegui");const plainTextEdit = new QPlainTextEdit();
new QPlainTextEdit(parent?)
parentNodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.
Static Methods
QPlainTextEdit can access all the static methods defined in NodeWidget
Instance Properties
QPlainTextEdit can access all the instance properties defined in NodeWidget.
plainTextEdit.placeholderText
The placeholder text set on the plainTextEdit.
Instance Methods
QPlainTextEdit can access all the instance methods defined in NodeWidget.
plainTextEdit.setPlainText(text)
Sets the given text to the plainTextEdit. It calls the native method QPlainTextEdit: setPlainText.
textstring
plainTextEdit.setPlaceholderText(text)
Sets the given text to the plainTextEdit's placeholder.
textstring
plainTextEdit.toPlainText()
Returns the text of the text edit as plain text. QPlainTextEdit: toPlainText.
plainTextEdit.setReadOnly(isReadOnly)
Sets the plainTextEdit to be read only. QPlainTextEdit: isReadOnly.
plainTextEdit.clear()
Deletes all the text in the text edit.QPlainTextEdit: clear.
plainTextEdit.setWordWrapMode(mode)
This property holds the mode QPlainTextEdit will use when wrapping text by words.QPlainTextEdit: setWordWrapMode.
- mode: QTextOptionWrapMode
plainTextEdit.wordWrapMode()
returns word wrap mode. QPlainTextEdit: wordWrapMode.
plainTextEdit.setLineWrapMode(mode)
This property holds the line wrap mode. QPlainTextEdit: setLineWrapMode.
- mode: LineWrapMode
plainTextEdit.lineWrapMode()
returns line wrap mode. QPlainTextEdit: setLineWrapMode.