ProjectExplorer: Replace project mode main window splitter by dockwidget

The main window of the project mode is already a QMainWindow,
using a dock window also for the empty space on the right makes
it consistent with the separation of the project tree on the left.

Change-Id: Ida42f267b87eb45cd1692ebcc16ded2ee6c1e523
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
hjk
2020-11-09 08:49:15 +01:00
parent 898558508d
commit d32cc4bd38
4 changed files with 24 additions and 52 deletions

View File

@@ -653,6 +653,19 @@ ProjectWindow::ProjectWindow()
{
setBackgroundRole(QPalette::Base);
// The empty space on the right side of the project mode window.
auto rightSpace = new QWidget;
rightSpace->setAutoFillBackground(true);
rightSpace->setObjectName("ProjectModeRightSpace"); // Needed for dock widget state saving
rightSpace->setWindowTitle("dummy");
auto rightSpaceLayout = new QVBoxLayout(rightSpace);
rightSpaceLayout->setContentsMargins(0, 0, 0, 0);
rightSpaceLayout->addWidget(new StyledBar(rightSpace)); // The black blob on top
rightSpaceLayout->addStretch();
addDockWidget(Qt::RightDockWidgetArea, addDockForWidget(rightSpace, true));
// Request custom context menu but do not provide any to avoid
// the creation of the dock window selection menu.
setContextMenuPolicy(Qt::CustomContextMenu);