PDA

View Full Version : QDockWidget : No floating



prashant
9th September 2009, 17:09
Hi,



dock = new QDockWidget(tr("Log"), this);
dock->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
dock->setFloating(false);
addDockWidget(Qt::BottomDockWidgetArea, dock);


When I press maximize button(two little square), the dock goes to floating status. What I need is, dock should maximize and cover the entire window area and pressing the button again should set the dock to it's previous state.

Secondly, this dock is taking too much height, how do I set the initial height.

Prashant

prashant
5th October 2009, 19:42
After reading numerous posts in this forum as well as on others I was not able to find a solution for the problem. I am looking for 3 features/properties in QDockWidget.

1. How to set initial size of dock?
2. Hide/Unhide dock does not remember it's original size. How to solve this?
3. Instead of floating, dock should cover the entire app area when pressing maximize button.

I have found one hack to solve 1. Although I haven't tried but I hope it'll work.
1. Start application
2. Adjust size of docks and save layout.
3. Reload layout at start up.