Skip to content

QSplitter

QSplitter is a widget that provides a splitter that you can use in your application.

Example

example_splitter.ts
import { QSplitter, QWidget, QBoxLayout, Direction, Orientation } from '@vixen-js/core';
const root = new QWidget();
const layout = new QBoxLayout(Direction.LeftToRight);
layout.setSpacing(0);
root.setLayout(layout);
root.setObjectName("root");
const hSplitter = new QSplitter();
hSplitter.setObjectName("hSplitter");
hSplitter.setOrientation(Orientation.Horizontal);
const left = new QWidget();
left.setinlineStyle("background-color: green;");
const right = new QWidget();
right.setinlineStyle("background-color: purple;");
root.layout!.addWidget(hSplitter);
hSplitter.addWidget(left);
hSplitter.addWidget(right);

Learn more about QSplitter in: https://doc.qt.io/qt-6/qsplitter.html