From f94f4189479cb5a5df5e506de522fa4faf098932 Mon Sep 17 00:00:00 2001 From: slidinghotdog Date: Tue, 3 Dec 2019 13:38:00 -0300 Subject: [PATCH] add layout prop to QBoxLayout --- src/lib/QtWidgets/QBoxLayout.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/QtWidgets/QBoxLayout.ts b/src/lib/QtWidgets/QBoxLayout.ts index 95b12114a..980d05fe3 100644 --- a/src/lib/QtWidgets/QBoxLayout.ts +++ b/src/lib/QtWidgets/QBoxLayout.ts @@ -6,6 +6,7 @@ import { Direction } from '../QtEnums'; export class QBoxLayout extends NodeLayout { native: NativeElement; + layout: NodeLayout | null; constructor(dir: Direction, parent?: NodeWidget) { let native: NativeElement; if (parent) { @@ -16,9 +17,11 @@ export class QBoxLayout extends NodeLayout { super(native); this.nodeParent = parent; this.native = native; + this.layout = null; } addLayout(layout: NodeLayout, stretch = 0): void { this.native.addLayout(layout.native, stretch); + this.layout = layout; } addSpacing(size: number): void { this.native.addSpacing(size); @@ -38,6 +41,7 @@ export class QBoxLayout extends NodeLayout { } insertLayout(index: number, layout: NodeLayout, stretch = 0): void { this.native.insertLayout(index, layout.native, stretch); + this.layout = layout; } removeWidget(widget: NodeWidget): void { this.native.removeWidget(widget.native);