* Adds base template for new docs site * Adds Apis to docs * add some css from rn * Fix right side sidebar functionality * Basic docs * adds old docs * Cleans up unnecessary files * Chane links * Adds docusaurus v2 * Styling fixes * adds wip and new assets * adds code image * Add FAQ link * Adds analytics * adds cname * cleanup blogs
1.3 KiB
1.3 KiB
| sidebar_label | title |
|---|---|
| QPushButton | QPushButton |
Create and control buttons.
This class is a JS wrapper around Qt's QPushButton class
A QPushButton provides ability to add and manipulate native button widgets.
QPushButton inherits from NodeWidget
Example
const { QPushButton } = require("@nodegui/nodegui");
const button = new QPushButton();
button.setText("Hello");
new QPushButton(parent?)
parentNodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.
Static Methods
QPushButton can access all the static methods defined in NodeWidget
Instance Properties
QPushButton can access all the instance properties defined in NodeWidget
Instance Methods
QPushButton can access all the instance methods defined in NodeWidget
Additionally it also has the following instance methods:
button.setText(text)
Sets the given text to the button.
textstring
button.setFlat(isFlat)
Sets whether the button border is raised.
isFlatboolean
button.setIcon(icon)
Sets an icon in the button.
iconQIcon