Hi,

My application's main form inherits from QMainWindow and I rely on QMainWindow's docking feature to dock some widgets to my main form. It all works fine and everything, but... I would like to be able to show/hide a docking area by simply clicking a button within the docking area.

The idea is that the user might have customised the main form with some widgets docked here and there. However, he might at some point want the central widget to get as much space as possible to carry out a particular task. So, I would like him to be able to temporarily hide one or several docking areas, carry out his particular task, and then re-show those one or several docking areas.

I know that I could 'manually' show/hide the dock widgets (after/before saving/restoring my application's state), but this would 'break' my GUI logic since I have some menu items which I use to show/hide those dock widgets. Also, this wouldn't address the question of how this 'showing'/'hiding' would be triggered which I want to be done through a button within the docking area.

So... I was thinking of customising QMainWindow's docking feature so that it could do what I am after. However, with Qt implementating QMainWidnow's docking feature in private classes means that I cannot customise anything. I am therefore thinking of 'cloning' QMainWindow (and whatever would need 'cloning'), renaming the clone to, say, TMainWindow, customising TMainWindow to my specific needs, and then have my main form inherit from TMainWindow rather than QMainWindow.

If at all possible, I would rather not go down that route, but what other options are available to me?... Anyone?...

Cheers, Alan.