All layouts inherit from qlayout on js side.

This commit is contained in:
Atul R 2019-06-06 11:34:06 +02:00
parent 0ea9675005
commit f9a209f34a
3 changed files with 6 additions and 8 deletions

View File

@ -1,8 +1,8 @@
import addon from "../../core/addon";
import { NodeWidget } from "../../QtGui/QWidget";
import { Component } from "../../core/Component";
import { QLayout } from "../QLayout";
export class QGridLayout extends Component {
export class QGridLayout extends QLayout {
native: any;
constructor(parent?: NodeWidget) {
super();

View File

@ -1,6 +1,4 @@
import addon from "../../core/addon";
import { Component } from "../../core/Component";
export class QLayout extends Component {
native = new addon.QLayout();
}
// All Layouts should extend this abstract class.
export abstract class QLayout extends Component {}

View File

@ -1,6 +1,6 @@
import { Component } from "../../../core/Component";
import { QLayout } from "../../../QtWidgets/QLayout";
export class FlexNode extends Component {
export class FlexNode extends QLayout {
native: any;
constructor(nativeNode: any) {
super();