nodeguy/website/docs/api/QPlainTextEdit.md
Atul R eca218ac79
Adds new doc site (#124)
* Adds base template for new docs site

* Adds Apis to docs

* add some css from rn

* Fix right side sidebar functionality

* Basic docs

* adds old docs

* Cleans up unnecessary files

* Chane links

* Adds docusaurus v2

* Styling fixes

* adds wip and new assets

* adds code image

* Add FAQ link

* Adds analytics

* adds cname

* cleanup blogs
2019-09-29 20:14:35 +02:00

2.7 KiB

sidebar_label title
QPlainTextEdit QPlainTextEdit

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?)

  • parent NodeWidget (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.

  • text string

plainTextEdit.setPlaceholderText(text)

Sets the given text to the plainTextEdit's placeholder.

  • text string

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.