PDA

View Full Version : How to hide a sub-window when scales its size to minimum?



aaron
11th May 2009, 03:28
Dear all,
I have a question for you, like the title said.
In my program, I have two sub-window in QMainWindow, and they are defined by QDockWidget, one of them is placed at bottom of mainwindow, another is right side.
I want to hide them when scale them size to minimum, for example, I scale the height of the QDockWidget which places in bottom, it will hide when its height becom minimum, and
I can show it again. Like the sub-window in left side of PowerPoint.
I reimplement resizeEvent() and sizeHint() function in my class which inherits from QDockWidget, but can not meet my requirtment.
By the Way, This two sub-window have QLayout.
If you have ever fixed this issue, please help me ,thanks!