PDA

View Full Version : Is it possible to restrict a floating QDockWidget to a certain screen area?



lukaslang
9th May 2011, 16:05
Dear all,

I want to have a window which is movable but prohibited to overlap other QDockWidgets, just like a QMdiSubwindow in normal mode. I tried a QDockWidget, but as a top level widget it cannot be restricted in position to a certain screen rectangle. A QMdiSubwindow sets all other Subwindows to normal mode too if it is restored (my central area is a QMdiArea already).

Any ideas?

mvuori
9th May 2011, 17:27
I have no idea of an elegant solution, but I guess you could keep a list of all QDockWidgets, capture their moveEvents and reposition them nicely, should they overlap.

lukaslang
10th May 2011, 08:51
Ok, another question: is it possible to have one QMdiSubwindow maximized and the other in normal mode?