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 | null

Inherited from Component.native

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


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