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
-
↳ QPen
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:
Name | Type |
---|---|
style | PenCapStyle |
Returns: void
setColor
▸ setColor(color
: QColor | GlobalColor): void
Parameters:
Name | Type |
---|---|
color | QColor | GlobalColor |
Returns: void
setStyle
▸ setStyle(style
: PenStyle): void
Parameters:
Name | Type |
---|---|
style | PenStyle |
Returns: void
setWidth
▸ setWidth(width
: number): void
Parameters:
Name | Type |
---|---|
width | number |
Returns: void
style
▸ style(): PenStyle
Returns: PenStyle