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
-
↳ QIcon
Index
Constructors
Properties
Methods
- actualSize
- addFile
- addPixmap
- availableSizes
- cacheKey
- isMask
- isNull
- name
- paint
- pixmap
- setIsMask
- swap
- fromQVariant
Constructors
constructor
+ new QIcon(): QIcon
Overrides Component.constructor
Returns: QIcon
+ new QIcon(native
: NativeElement): QIcon
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
native | NativeElement |
Returns: QIcon
+ new QIcon(filePath
: string): QIcon
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
filePath | string |
Returns: QIcon
+ new QIcon(pixmap
: QPixmap): QIcon
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
pixmap | QPixmap |
Returns: QIcon
Properties
native
• native: NativeElement | null
Inherited from Component.native