[PyQt] Movable Dock Widget

Vincent Vande Vyvre vincent.vande.vyvre at telenet.be
Wed Jul 8 15:49:31 BST 2015


A QDockWidget is not designed for a simple QWidget, you need to use a 
QMainWindow.

When, in the Qt Designer, you put your QDocWidget, check mark the option 
*docked*. This is the last option.

You have to do that before you set your form layout otherwise the option 
is disabled and the dock will be placed into the form layout and that's 
your problem.

After conversion with pyuicx you'll see this line:
         MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), 
self.dockWidget)
if not, the dock is not movable.

Vincent

I don't no why but this is my third response to this mail since 
yesterday, I hope this one will be accepted.


More information about the PyQt mailing list