0

I'm using QDockWidget on the left and bottom of my UI. But no matter in which order I set them, the bottom one will always cut off the left one.

enter image description here

Is there a way to get the left docker extended to the bottom?

wasp256
  • 5,943
  • 12
  • 72
  • 119
  • 3
    I think you're looking for [`QMainWindow::setCorner`](https://doc.qt.io/qt-5/qmainwindow.html#setCorner). – G.M. Aug 03 '20 at 09:04
  • Fantastic, exactly what I needed! Could you put it as an answer then I'll accept it – wasp256 Aug 04 '20 at 10:49

1 Answers1

3

As per the comment you can make use of QMainWindow::setCorner to assign a corner to a particular dock area. In your case you need...

setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
G.M.
  • 12,232
  • 2
  • 15
  • 18
  • For PyQt5 users: `from PyQt5 import QtCore` and `mainWindow.setCorner( QtCore.Qt.BottomLeftCorner, QtCore.Qt.LeftDockWidgetArea )` – Joseph Meadows Jun 24 '22 at 14:38