PDA

View Full Version : Pin/Unpin Dock Widget



charlesD
19th June 2006, 15:59
Does anyone what is required to create a dock widget that allows the user to show it, then pin it open if the user so chooses, similar to the behavior of the toolbox in visual studio .Net? I have tried playing with many of the size settings to get the desired behavior to no avail. I would like the dock widget to overlap the central widget when shown (but not pinned), then have the central widget (and any other visible widgets) resize themselves if the widget is pinned. I would hope I can do this all while having the window docked rather than floating, but I don't know if it's possible to have widget overlap when docked. Thanks in advance for any help.

jpn
21st June 2006, 06:57
I think this might be impossible without major customization. QMainWindow has it's own private layout which handles all main window specific components, including dock widgets. You might have to rewrite a few components like dock widget and main window (layout). For the hide/show scrolling effect, take a look at src/gui/widgets/effects.* (another private class of Qt).

I wouldn't mind having these features either.. ;) I'm not sure if this is very common component in Windows as the only application I've seen it in is VS.net. But still, maybe one could even make a suggestion (http://www.trolltech.com/developer/task-tracker/) for TT to implement something like this in the future versions of Qt.