* adds basic typedoc * backup * Adds all docs to source code * Adds autogenerated docs * Fixes doc links * Updates docs
3.6 KiB
| id | title | sidebar_label |
|---|---|---|
| qapplication | QApplication | 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
-
↳ QApplication
Index
Constructors
Properties
Methods
- exec
- exit
- processEvents
- quit
- quitOnLastWindowClosed
- setNodeParent
- setQuitOnLastWindowClosed
- clipboard
- instance
- style
Constructors
constructor
+ new QApplication(): QApplication
Returns: QApplication
+ new QApplication(native: NativeElement): QApplication
Parameters:
| Name | Type |
|---|---|
native |
NativeElement |
Returns: QApplication
Properties
native
• native: NativeElement
nodeChildren
• nodeChildren: Set‹unknown› = new Set()
Inherited from Component.nodeChildren
Optional nodeParent
• nodeParent? : Component
Inherited from Component.nodeParent
Methods
exec
▸ exec(): number
Returns: number
exit
▸ exit(exitCode: number): number
Parameters:
| Name | Type |
|---|---|
exitCode |
number |
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:
| Name | Type |
|---|---|
parent? |
Component |
Returns: void
setQuitOnLastWindowClosed
▸ setQuitOnLastWindowClosed(quit: boolean): void
Parameters:
| Name | Type |
|---|---|
quit |
boolean |
Returns: void
Static clipboard
▸ clipboard(): QClipboard
Returns: QClipboard
Static instance
▸ instance(): QApplication
Returns: QApplication
Static style
▸ style(): QStyle
Returns: QStyle