[PyQt] A question about QDockWidget layout

flya flya flyaflyaa at gmail.com
Tue Feb 16 10:34:06 GMT 2010


ps:
uncomment the code:

#        panel = self.ui.dockWidgetContents_4
#        layout = panel.layout()
#        panel.setFixedHeight(layout.minimumSize().height())

the dockwidget has minimum size, but be fixed, I hope it not fixed.


On Tue, Feb 16, 2010 at 6:30 PM, flya flya <flyaflyaa at gmail.com> wrote:
> I make a dock widget on top, and central widget at bottom, I hope the
> dock widget has minimum size when changing the contents on it, but its
> size often bigger, I tried to change sizePolice, but can't make to
> work, the only way I found is use
> setFixedHeight(layout.minimumSize().height()), then It became minimum
> size, but it became fixed too. I hope it have a minimum size when
> layout and not be fixed ,how to do it?
>
> please see attachment, click the button to change the content on dockwidget.
>


More information about the PyQt mailing list