update layout to better fit
This commit is contained in:
@@ -32,17 +32,17 @@ void MainWindow::setupUI()
|
||||
m_pipelineWidget = new GStreamerPipelineWidget(m_socketClient, this);
|
||||
m_cameraWidget = new CameraControlWidget(m_socketClient, this);
|
||||
|
||||
// Create tab widget for controls
|
||||
// Create tab widget for controls on the right
|
||||
QTabWidget* controlTabs = new QTabWidget(this);
|
||||
controlTabs->addTab(m_pipelineWidget, "Pipeline Control");
|
||||
controlTabs->addTab(m_cameraWidget, "Camera Control");
|
||||
|
||||
// Create vertical splitter: video on top, controls on bottom
|
||||
QSplitter* mainSplitter = new QSplitter(Qt::Vertical, this);
|
||||
// Create horizontal splitter: video on left (full height), controls on right
|
||||
QSplitter* mainSplitter = new QSplitter(Qt::Horizontal, this);
|
||||
mainSplitter->addWidget(m_videoWidget);
|
||||
mainSplitter->addWidget(controlTabs);
|
||||
mainSplitter->setStretchFactor(0, 3); // Video gets more space
|
||||
mainSplitter->setStretchFactor(1, 1); // Controls get less space
|
||||
mainSplitter->setStretchFactor(0, 2); // Video gets more space (2/3)
|
||||
mainSplitter->setStretchFactor(1, 1); // Controls get less space (1/3)
|
||||
|
||||
// Set as central widget
|
||||
setCentralWidget(mainSplitter);
|
||||
|
||||
Reference in New Issue
Block a user