(child: QWidget<any>)
| 239 | this.appendChild(child); |
| 240 | } |
| 241 | appendChild(child: QWidget<any>): void { |
| 242 | if (!child || child instanceof QDialog) { |
| 243 | return; |
| 244 | } |
| 245 | if (!this.layout()) { |
| 246 | const flexLayout = new FlexLayout(); |
| 247 | flexLayout.setFlexNode(this.getFlexNode()); |
| 248 | this.setLayout(flexLayout); |
| 249 | } |
| 250 | this.layout()!.addWidget(child); |
| 251 | } |
| 252 | removeChild(child: QWidget<any>) { |
| 253 | if (!this.layout()) { |
| 254 | console.warn("parent has no layout to remove child from"); |
no test coverage detected