nodeguy/website/docs/api/QSpinBox.md
Atul R eca218ac79
Adds new doc site (#124)
* 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
2019-09-29 20:14:35 +02:00

3.0 KiB

sidebar_label title
QSpinBox QSpinBox

Create and control spin box widgets.

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

A QSpinBox provides ability to add and manipulate native spin box widgets.

QSpinBox inherits from NodeWidget

Example

const { QSpinBox } = require("@nodegui/nodegui");

const spinBox = new QSpinBox();

new QSpinBox(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

QSpinBox can access all the static methods defined in NodeWidget

Instance Properties

QSpinBox can access all the instance properties defined in NodeWidget

Instance Methods

QSpinBox can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:

spinBox.setValue(val)

Sets the current value of the spinBox. It calls the native method QSpinBox: setValue.

  • val number - Set the value as current value

spinBox.setRange(minimum, maximum)

Sets the min/max value of the spinBox. It calls the native method QSpinBox: setRange.

  • max number - Set the value as max value of the progress bar.

spinBox.setPrefix(prefix)

Sets the prefix of the spinBox. It calls the native method QSpinBox: setPrefix.

spinBox.setSuffix(suffix)

Sets the suffix of the spinBox. It calls the native method QSpinBox: setSuffix.

spinBox.setSingleStep(val)

Sets the single step value of the spinBox. It calls the native method QSpinBox: setSingleStep.

spinBox.cleanText()

Returns the text content (String) of the spinBox excluding any prefix, suffix, or leading or trailing whitespace. It calls the native method QSpinBox: value.

spinBox.minimum()

Returns the minimum value (Number) of the spinBox. It calls the native method QSpinBox: value.

spinBox.maximum()

Returns the maximum value (Number) of the spinBox. It calls the native method QSpinBox: value.

spinBox.value()

Returns the current value (Number) of the spinBox. It calls the native method QSpinBox: value.