Removing Docks from a DockArea?

364 views
Skip to first unread message

Philip Reinhold

unread,
May 17, 2013, 8:15:58 PM5/17/13
to pyqt...@googlegroups.com
I'd like to be able to remove Docks from a DockArea. I can't seem to find a standard way of doing this. Hiding the widget yields reasonable behavior for a small number of hidden items, but multiple hidden widgets can create large blank spaces in the DockArea.

Thanks for your help!

Luke Campagnola

unread,
May 17, 2013, 10:04:52 PM5/17/13
to pyqt...@googlegroups.com
On Fri, May 17, 2013 at 8:15 PM, Philip Reinhold <pcrei...@gmail.com> wrote:
I'd like to be able to remove Docks from a DockArea. I can't seem to find a standard way of doing this. Hiding the widget yields reasonable behavior for a small number of hidden items, but multiple hidden widgets can create large blank spaces in the DockArea.


Huh! Somehow I've used this for years without ever needing to close a dock :)
I'll add a Dock.close() method to the next release. 

For now, you can do this:

    dock.setParent(None)
    dock.label.setParent(None)


Thanks!
Luke 
Reply all
Reply to author
Forward
0 new messages