The design using Qt Designer:
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>27</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QDockWidget" name="dockWidget">
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents"/>
</widget>
<widget class="QDockWidget" name="dockWidget_2">
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_2"/>
</widget>
<widget class="QDockWidget" name="dockWidget_5">
<attribute name="dockWidgetArea">
<number>8</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_3"/>
</widget>
<widget class="QDockWidget" name="dockWidget_3">
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_6"/>
</widget>
<widget class="QDockWidget" name="dockWidget_4">
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_7"/>
</widget>
</widget>
<resources/>
<connections/>
</ui>
With C++ code:
#include <QtWidgets>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QMainWindow w;
QDockWidget *dock_widget_a = new QDockWidget;
w.addDockWidget(Qt::LeftDockWidgetArea, dock_widget_a);
QDockWidget *dock_widget_b = new QDockWidget;
w.addDockWidget(Qt::LeftDockWidgetArea, dock_widget_b);
QDockWidget *dock_widget_c = new QDockWidget;
w.addDockWidget(Qt::RightDockWidgetArea, dock_widget_c);
QDockWidget *dock_widget_d = new QDockWidget;
w.addDockWidget(Qt::RightDockWidgetArea, dock_widget_d);
QDockWidget *dock_widget_e = new QDockWidget;
w.addDockWidget(Qt::BottomDockWidgetArea, dock_widget_e);
w.setCentralWidget(new QWidget);
w.resize(640, 480);
w.show();
return a.exec();
}