Splitting the screen into 2 docks and the map canvas

40 views Asked by At

In QGIS, I'm targetting to have 2 docks and the map canvas as shown on the sketch. However, using the following snippet

def show_dock(self) -> None:   # Here, show_dock is processed via an'add_action' method
    if not self.dock_widget:
        self.dock_widget = Dock1(self.iface, self.dock_widget)
    if not self.dock_widget2:
        self.dock_widget2 = Dock2(self.iface, self.dock_widget2)
    self.iface.addDockWidget(
        Qt.TopDockWidgetArea, self.dock_widget)
    self.iface.addDockWidget(
        Qt.RightDockWidgetArea, self.dock_widget2)

results in a different splitting from the target (see sketch). My interpretation is that QGIS performs the 2nd operation over the result from the 1st operation. I'd like to know if there's a straightforward procedure to achieve 2 goals: 1 - Perform the 1st operation (vertical splitting) followed by a horizontal splitting solely of the map canvas. 2 - After performing this operation, is it possible to fix the (horizontal) size to 2/3 of the screen resolution (which would be mostly 1,920 pixels but not always)?

enter image description here

0

There are 0 answers