QApplication

QApplication is the root object for the entire application. It manages app level settings.

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

The QApplication class manages the GUI application's control flow and main settings. In NodeGui you will never create an instance of it manually. NodeGui's internal runtime Qode does it for you on app start. You can access the initialised QApplication though if needed.

Example

const { QApplication } = require("@nodegui/nodegui");
const qApp = QApplication.instance();
qApp.quit();

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QApplication(): QApplication

Overrides Component.constructor

Returns: QApplication

+ new QApplication(native: NativeElement): QApplication

Overrides Component.constructor

Parameters:

NameType
nativeNativeElement

Returns: QApplication

Properties

native

native: NativeElement

Overrides Component.native


nodeChildren

nodeChildren: Set‹Component

Inherited from Component.nodeChildren


Optional nodeParent

nodeParent? : Component

Inherited from Component.nodeParent

Methods

exec

exec(): number

Returns: number


exit

exit(exitCode: number): number

Parameters:

NameType
exitCodenumber

Returns: number


processEvents

processEvents(): void

Returns: void


quit

quit(): number

Returns: number


quitOnLastWindowClosed

quitOnLastWindowClosed(): boolean

Returns: boolean


setNodeParent

setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

NameType
parent?Component

Returns: void


setQuitOnLastWindowClosed

setQuitOnLastWindowClosed(quit: boolean): void

Parameters:

NameType
quitboolean

Returns: void


Static clipboard

clipboard(): QClipboard

Returns: QClipboard


Static instance

instance(): QApplication

Returns: QApplication


Static style

style(): QStyle

Returns: QStyle