1.5 KiB
1.5 KiB
Class: QCheckBox
Create and control checkbox.
This class is a JS wrapper around Qt's QCheckBox class
A QCheckBox provides ability to add and manipulate native checkbox widgets.
QCheckBox inherits from NodeWidget
Example
const { QCheckBox } = require("@nodegui/nodegui");
const checkbox = new QCheckBox();
checkbox.setText("Hello");
new QCheckBox(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
QCheckBox can access all the static methods defined in NodeWidget
Instance Properties
QCheckBox can access all the instance properties defined in NodeWidget
Instance Methods
QCheckBox can access all the instance methods defined in NodeWidget
Additionally it also has the following instance methods:
checkbox.setText(text)
Sets the given text to the checkbox.
textstring
checkbox.isChecked()
returns whether the checkbox is checked or not. It calls the native method QAbstractButton: isChecked.
checkbox.setChecked(check)
This property holds whether the button is checked. It calls the native method QAbstractButton: setChecked.
checkboolean