[PyQt] setLayout for a QDockWidget
apaku at gmx.de
Thu Jun 25 18:44:22 BST 2009
On 25.06.09 18:56:57, TP wrote:
> Try the small script below. I cannot manage to do setLayout for a
> QDockWidget: QDockWidget.setWidget() works correctly, but not
> QDockwidget.setLayout(), I obtain the following message:
> QWidget::setLayout: Attempting to set QLayout "" on QDockWidget "", which
> already has a layout
> So, with some googling, I found:
> It seems that there is a default layout inside a QDockWidget when it is
> created. How to delete this default layout in PyQt, and then set as new
> layout "vboxlayout" with the spin box in the following code?
Thats not the way to use QDockWidget, please look at the dockwidgets
example and the API documentation to find out how to use that properly.
You have Egyptian flu: you're going to be a mummy.
More information about the PyQt