PDA

View Full Version : Dock resizing when move another area [resolved]



castors33
13th June 2011, 16:49
Hi,

my problem is this one : I have implemented a QMainWindow with a central widget et a dock to its right, it only contains 6 QPushButton. I have made this dock to change QVBoxLayout to QHBoxLayout when the dock is dragged from the right or left to up or down....to be horizontal instead of vertical...and the opposite also.
But, when it is done, the dock never minimize taking space as much as it could, vertically and horizontally.
How can the dock fully minimize itself at every area changing.
I tried resize(), thinking it would be easy, but it doesn't work.

Thanks

castors33
13th June 2011, 20:59
I found it...I only needed to use QSizePolicy and setSizePolicy with my dock with needed parameters, mine were maximum and minimumExpanding