* 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.5 KiB
1.5 KiB
| sidebar_label | title |
|---|---|
| QGridLayout | QGridLayout |
The QGridLayout class lays out widgets in a grid.
This class is a JS wrapper around Qt's QGridLayout
QGridLayout inherits from NodeLayout
Example
const { QGridLayout, QWidget, QLabel } = require("@nodegui/nodegui");
const view = new QWidget();
const layout = new QGridLayout();
view.setLayout(layout);
const label = new QLabel();
label.setText("label1");
const label2 = new QLabel();
label2.setText("label2");
layout.addWidget(label);
layout.addWidget(label2);
Static Methods
QGridLayout can access all the static methods defined in NodeLayout
Instance Properties
QGridLayout can access all the instance properties defined in NodeLayout
Instance Methods
QGridLayout can access all the instance methods defined in NodeLayout
Additionally it also has the following instance methods:
layout.addWidget(childWidget)
Adds the childWidget to the layout. It calls the native method QGridLayout QGridLayout: addWidget.
childWidgetNodeWidget - child widget that needs to be added to the layout.
layout.removeWidget(childWidget)
Removes the childWidget from the layout. It calls the native method of custom QGridLayout. QGridLayout: removeWidget.
childWidgetNodeWidget - child widget that needs to be added to the layout.