[PyQt] Re: setLayout for a QDockWidget
apaku at gmx.de
Mon Jun 29 10:09:56 BST 2009
On 29.06.09 10:09:50, TP wrote:
> Andreas Pakulat wrote:
> > 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.
> The dockwidgets example uses setWidget. Why has QDockWidget a setLayout
> class if we cannot use it?
Because its a QWidget subclass.
> Qt documentation seems to say that there is nothing wrong using
The the docs should be fixed, the QDockWidget does use its layout itself to
actually possition it various parts, and hence if you set your own custom
layout that'll be broken.
However the docs say that QDockWidget acts as a wrapper around its child
widget which is set via setWidget. So while it doesn't prohibit using
setLayout it also doesn't suggest using that function to setup the GUI.
You will have a long and unpleasant discussion with your supervisor.
More information about the PyQt