Reputation: 8356
I'm trying to create an application with layout similar to Qt's BorderLayout example and I'm using it as a template. How can I make regions resizable by dragging mouse on the border between them like with QSplitter?
Upvotes: 3
Views: 124
Reputation: 8356
I managed to solve the problem without using BorderLayout at all:
QTextBrowser *centralWidget = new QTextBrowser;
centralWidget->setPlainText(tr("Central widget"));
QLabel* west = createLabel( "West" );
QLabel* east = createLabel( "East" );
QLabel* south = createLabel( "South" );
QSplitter* splitter = new QSplitter();
splitter->addWidget(west);
splitter->addWidget(centralWidget);
splitter->addWidget(east);
QSplitter* splitter2 = new QSplitter( Qt::Orientation::Vertical );
splitter2->addWidget( splitter );
splitter2->addWidget( south );
Upvotes: 1