nodeguy/website/docs/api/QScrollArea.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

1.5 KiB

sidebar_label title
QScrollArea QScrollArea

A QScrollArea provides a scrolling view onto another widget.

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

QScrollArea inherits from QAbstractScrollArea

Example

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

const scrollArea = new QScrollArea();
scrollArea.setInlineStyle("flex: 1; width:'100%';");

const imageLabel = new QLabel();
const pixmap = new QPixmap(
  path.resolve(__dirname, "../extras/assets/kitchen.png")
);
imageLabel.setPixmap(pixmap);

scrollArea.setWidget(imageLabel);

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

QScrollArea can access all the static methods defined in QAbstractScrollArea

Instance Properties

QScrollArea can access all the instance properties defined in QAbstractScrollArea

Instance Methods

QScrollArea can access all the instance methods defined in QAbstractScrollArea. Additionally it also has the following instance methods:

scrollArea.setWidget(widget)

Sets the scroll area's widget. It calls the native method QScrollArea: setWidget.

  • widget NodeWidget - Any widget you want to enclose in a scroll area.