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