QTextEdit
Create and control editable text field.
This class is a JS wrapper around Qt's QTextEdit class
A QTextEdit
provides ability to add and manipulate native editable text field widgets.
Example
const { QTextEdit } = require("@nodegui/nodegui");
const textEdit = new QTextEdit();
Type parameters
▪ Signals: QTextEditSignals
Hierarchy
↳ QAbstractScrollArea‹Signals›
↳ QTextEdit
Index
Constructors
Properties
Methods
- _id
- acceptDrops
- acceptRichText
- accessibleDescription
- accessibleName
- activateWindow
- addAction
- addEventListener
- adjustSize
- alignment
- append
- autoFillBackground
- autoFormatting
- baseSize
- canPaste
- childAt
- children
- childrenRect
- clear
- clearFocus
- clearMask
- close
- colorCount
- contentsRect
- contextMenuPolicy
- copy
- currentFont
- cursorWidth
- cut
- delete
- deleteLater
- depth
- devicePixelRatio
- devicePixelRatioF
- documentTitle
- dumpObjectInfo
- dumpObjectTree
- ensureCursorVisible
- ensurePolished
- eventProcessed
- focusProxy
- focusWidget
- font
- fontFamily
- fontItalic
- fontPointSize
- fontUnderline
- fontWeight
- frameGeometry
- frameRect
- frameShadow
- frameShape
- frameSize
- frameStyle
- frameWidth
- geometry
- getFlexNode
- grab
- grabKeyboard
- grabMouse
- hasFocus
- hasHeightForWidth
- hasMouseTracking
- hasTabletTracking
- height
- heightForWidth
- heightMM
- hide
- horizontalScrollBar
- inherits
- inputMethodHints
- insertHtml
- insertPlainText
- isActiveWindow
- isAncestorOf
- isEnabled
- isEnabledTo
- isFullScreen
- isHidden
- isMaximized
- isMinimized
- isModal
- isReadOnly
- isUndoRedoEnabled
- isVisible
- isVisibleTo
- isWindow
- isWindowModified
- killTimer
- layout
- lineWidth
- lineWrapColumnOrWidth
- lineWrapMode
- logicalDpiX
- logicalDpiY
- lower
- mapFrom
- mapFromGlobal
- mapFromParent
- mapTo
- mapToGlobal
- mapToParent
- maximumHeight
- maximumSize
- maximumViewportSize
- maximumWidth
- midLineWidth
- minimumHeight
- minimumSize
- minimumSizeHint
- minimumWidth
- move
- nativeParentWidget
- nextInFocusChain
- normalGeometry
- objectName
- overwriteMode
- paintingActive
- parent
- parentWidget
- paste
- physicalDpiX
- physicalDpiY
- placeholderText
- pos
- previousInFocusChain
- property
- raise
- rect
- redo
- releaseKeyboard
- releaseMouse
- releaseShortcut
- removeAction
- removeEventListener
- repaint
- repolish
- resize
- scrollToAnchor
- selectAll
- setAcceptDrops
- setAcceptRichText
- setAccessibleDescription
- setAccessibleName
- setAlignment
- setAttribute
- setAutoFillBackground
- setAutoFormatting
- setBaseSize
- setContentsMargins
- setContextMenuPolicy
- setCurrentFont
- setCursor
- setCursorWidth
- setDisabled
- setDocumentTitle
- setEnabled
- setEventProcessed
- setFixedHeight
- setFixedSize
- setFixedWidth
- setFlexNodeSizeControlled
- setFocus
- setFocusPolicy
- setFocusProxy
- setFont
- setFontFamily
- setFontItalic
- setFontPointSize
- setFontUnderline
- setFontWeight
- setFrameRect
- setFrameShadow
- setFrameShape
- setFrameStyle
- setGeometry
- setGraphicsEffect
- setHidden
- setHorizontalScrollBar
- setHorizontalScrollBarPolicy
- setHtml
- setInlineStyle
- setInputMethodHints
- setLayout
- setLineWidth
- setLineWrapColumnOrWidth
- setLineWrapMode
- setMaximumHeight
- setMaximumSize
- setMaximumWidth
- setMidLineWidth
- setMinimumHeight
- setMinimumSize
- setMinimumWidth
- setMouseTracking
- setObjectName
- setOverwriteMode
- setParent
- setPlaceholderText
- setPlainText
- setProperty
- setReadOnly
- setShortcutAutoRepeat
- setShortcutEnabled
- setSizeIncrement
- setSizePolicy
- setStatusTip
- setStyleSheet
- setTabChangesFocus
- setTabStopDistance
- setTabletTracking
- setText
- setTextBackgroundColor
- setTextColor
- setTextInteractionFlags
- setToolTip
- setToolTipDuration
- setUndoRedoEnabled
- setUpdatesEnabled
- setVerticalScrollBar
- setVerticalScrollBarPolicy
- setViewport
- setVisible
- setWhatsThis
- setWindowFilePath
- setWindowFlag
- setWindowIcon
- setWindowModified
- setWindowOpacity
- setWindowRole
- setWindowState
- setWindowTitle
- setWordWrapMode
- show
- showFullScreen
- showMaximized
- showMinimized
- showNormal
- size
- sizeHint
- sizeIncrement
- stackUnder
- startTimer
- statusTip
- style
- styleSheet
- tabChangesFocus
- tabStopDistance
- testAttribute
- textInteractionFlags
- toHtml
- toPlainText
- toolTip
- toolTipDuration
- underMouse
- undo
- unsetCursor
- unsetLayoutDirection
- unsetLocale
- update
- updateGeometry
- updateMicroFocus
- updatesEnabled
- verticalScrollBar
- viewport
- whatsThis
- width
- widthMM
- winId
- window
- windowFilePath
- windowHandle
- windowIcon
- windowOpacity
- windowRole
- windowState
- windowTitle
- wordWrapMode
- x
- y
- zommIn
- zoomOut
Constructors
constructor
+ new QTextEdit(arg?
: QWidget‹QWidgetSignals› | NativeElement): QTextEdit
Overrides QFrame.constructor
Parameters:
Name | Type |
---|---|
arg? | QWidget‹QWidgetSignals› | NativeElement |
Returns: QTextEdit
Properties
_rawInlineStyle
• _rawInlineStyle: string
Inherited from QMenu._rawInlineStyle
native
• native: NativeElement | null
Inherited from Component.native
type
• type: string
Methods
_id
▸ _id(): number
Get an ID identifying the underlying C++ object.
This can be useful when debugging memory problems with help from
setLogCreateQObject()
and setLogDestroyQObject()
. The number is
hash of the memory address of the C++ object.
Returns: number
a unique number which is valid for the lifetime of the C++ object.
acceptDrops
▸ acceptDrops(): boolean
Inherited from QMenu.acceptDrops
Returns: boolean
acceptRichText
▸ acceptRichText(): boolean
Returns: boolean
accessibleDescription
▸ accessibleDescription(): string
Inherited from QMenu.accessibleDescription
Returns: string
accessibleName
▸ accessibleName(): string
Inherited from QMenu.accessibleName
Returns: string
activateWindow
▸ activateWindow(): void
Inherited from QMenu.activateWindow
Returns: void
addAction
▸ addAction(action
: QAction | string): QAction
Inherited from QMenu.addAction
Parameters:
Name | Type |
---|---|
action | QAction | string |
Returns: QAction
addEventListener
▸ addEventListener‹SignalType›(signalType
: SignalType, callback
: Signals[SignalType], options?
: EventListenerOptions): void
Inherited from EventWidget.addEventListener
Type parameters:
▪ SignalType: keyof Signals
Parameters:
Name | Type | Description |
---|---|---|
signalType | SignalType | SignalType is a signal from the widgets signals interface. |
callback | Signals[SignalType] | Corresponding callback for the signal as mentioned in the widget's signal interface |
options? | EventListenerOptions | Extra optional options controlling how this event listener is added. |
Returns: void
void
For example in the case of QPushButton:
const button = new QPushButton();
button.addEventListener('clicked',(checked)=>console.log("clicked"));
// here clicked is a value from QPushButtonSignals interface
▸ addEventListener(eventType
: WidgetEventTypes, callback
: function, options?
: EventListenerOptions): void
Inherited from EventWidget.addEventListener
Parameters:
▪ eventType: WidgetEventTypes
▪ callback: function
▸ (event?
: NativeRawPointer‹"QEvent"›): void
Parameters:
Name | Type |
---|---|
event? | NativeRawPointer‹"QEvent"› |
▪Optional
options: EventListenerOptions
Extra optional options controlling how this event listener is added.
For example in the case of QPushButton:
const button = new QPushButton();
button.addEventListener(WidgetEventTypes.HoverEnter,()=>console.log("hovered"));
Returns: void
adjustSize
▸ adjustSize(): void
Inherited from QMenu.adjustSize
Returns: void
alignment
▸ alignment(): AlignmentFlag
Returns: AlignmentFlag
append
▸ append(text
: string): void
Parameters:
Name | Type |
---|---|
text | string |
Returns: void
autoFillBackground
▸ autoFillBackground(): boolean
Inherited from QMenu.autoFillBackground
Returns: boolean
autoFormatting
▸ autoFormatting(): AutoFormattingFlag
Returns: AutoFormattingFlag
baseSize
▸ baseSize(): QSize
Returns: QSize
canPaste
▸ canPaste(): boolean
Returns: boolean
childAt
▸ childAt(x
: number, y
: number): QWidget
Parameters:
Name | Type |
---|---|
x | number |
y | number |
Returns: QWidget