QPen

The QPen class defines the outline of shapes drawn by QPainter.

This class is a JS wrapper around Qt's QPen class

Example

const { QPen } = require("@nodegui/nodegui");
const pen = new QPen();

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QPen(): QPen

Overrides Component.constructor

Returns: QPen

Properties

native

native: NativeElement

Overrides Component.native


nodeChildren

nodeChildren: Set‹Component

Inherited from Component.nodeChildren


Optional nodeParent

nodeParent? : Component

Inherited from Component.nodeParent

Methods

color

color(): QColor

Returns: QColor


setCapStyle

setCapStyle(style: PenCapStyle): void

Parameters:

NameType
stylePenCapStyle

Returns: void


setColor

setColor(color: QColor | GlobalColor): void

Parameters:

NameType
colorQColor | GlobalColor

Returns: void


setNodeParent

setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

NameType
parent?Component

Returns: void


setStyle

setStyle(style: PenStyle): void

Parameters:

NameType
stylePenStyle

Returns: void


setWidth

setWidth(width: number): void

Parameters:

NameType
widthnumber

Returns: void


style

style(): PenStyle

Returns: PenStyle