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


const { QPushButton } = require("@nodegui/nodegui");
const button = new QPushButton();

new QPushButton(parent?)

  • parent NodeWidget (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:


Sets the given text to the button.

  • text string


Sets whether the button border is raised.

  • isFlat boolean


Sets an icon in the button.

  • icon QIcon