nodeguy/website/docs/api/generated/classes/qicon.md
Atul R 392aa3cd4c
Adds automatic docs for now (#308)
* adds basic typedoc

* backup

* Adds all docs to source code

* Adds autogenerated docs

* Fixes doc links

* Updates docs
2019-12-29 00:42:06 +05:30

3.0 KiB
Raw Blame History

id title sidebar_label
qicon QIcon QIcon

The QIcon class provides scalable icons in different modes and states.

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

Example

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

const imageUrl = "path/to/png";
const icon = new QIcon(imageUrl);

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QIcon(): QIcon

Returns: QIcon

+ new QIcon(native: NativeElement): QIcon

Parameters:

Name Type
native NativeElement

Returns: QIcon

+ new QIcon(filePath: string): QIcon

Parameters:

Name Type
filePath string

Returns: QIcon

Properties

native

native: NativeElement

Overrides Component.native


nodeChildren

nodeChildren: Setunknown = new Set()

Inherited from Component.nodeChildren


Optional nodeParent

nodeParent? : Component

Inherited from Component.nodeParent

Methods

cacheKey

cacheKey(): number

Returns: number


isMask

isMask(): boolean

Returns: boolean


pixmap

pixmap(width: number, height: number, mode?: QIconMode, state?: QIconState): QPixmap

Parameters:

Name Type
width number
height number
mode? QIconMode
state? QIconState

Returns: QPixmap


setIsMask

setIsMask(isMask: boolean): void

Parameters:

Name Type
isMask boolean

Returns: void


setNodeParent

setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

Name Type
parent? Component

Returns: void


Static fromQVariant

fromQVariant(variant: QVariant): QIcon

Parameters:

Name Type
variant QVariant

Returns: QIcon