nodeguy/website/docs/api/generated/classes/qbrush.md
Atul R 7b8a3b8088
Update docs 14 (#470)
* Adds docs for handling events

* updates docs to latest version

* adds more text

* fixes docs

* upgrade yarn lock
2020-03-28 20:46:26 +01:00

4.2 KiB
Raw Permalink Blame History

id title sidebar_label
qbrush QBrush QBrush

The QBrush class defines the fill pattern of shapes drawn by QPainter.

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

Example

const { QBrush } = require("@nodegui/nodegui");

const brush = new QBrush();

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QBrush(): QBrush

Overrides Component.constructor

Returns: QBrush

+ new QBrush(nativeElement: NativeElement): QBrush

Overrides Component.constructor

Parameters:

Name Type
nativeElement NativeElement

Returns: QBrush

+ new QBrush(color: GlobalColor, style: BrushStyle): QBrush

Overrides Component.constructor

Parameters:

Name Type
color GlobalColor
style BrushStyle

Returns: QBrush

+ new QBrush(color: QColor, style: BrushStyle): QBrush

Overrides Component.constructor

Parameters:

Name Type
color QColor
style BrushStyle

Returns: QBrush

Properties

native

native: NativeElement

Overrides Component.native


nodeChildren

nodeChildren: SetComponent

Inherited from Component.nodeChildren


Optional nodeParent

nodeParent? : Component

Inherited from Component.nodeParent

Methods

color

color(): QColor

Returns: QColor


isOpaque

isOpaque(): boolean

Returns: boolean


setColor

setColor(color: QColor | GlobalColor): void

Parameters:

Name Type
color QColor | GlobalColor

Returns: void


setNodeParent

setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

Name Type
parent? Component

Returns: void


setStyle

setStyle(style: BrushStyle): void

Parameters:

Name Type
style BrushStyle

Returns: void


setTexture

setTexture(pixmap: QPixmap): void

Parameters:

Name Type
pixmap QPixmap

Returns: void


style

style(): BrushStyle

Returns: BrushStyle


texture

texture(): QPixmap

Returns: QPixmap


Static fromQVariant

fromQVariant(variant: QVariant): QBrush

Parameters:

Name Type
variant QVariant

Returns: QBrush