Subwindow can't move with mainwindow.
suym last edited by
There are two widgets. Widget B is in widget A. And I set Widget B as Qt::Window, like a toolbar floating on widget A.
The question is, when I move widget A, B will not follow it, even I rewrite the move event. Since the relative position of A and B doesn't change. So how can I deal with it? Or any other way to realize this function?
Bonnie last edited by Bonnie
That's not a "subwindow" but a top-level window with a parent. A "subwindow" is what in a QMdiArea.
If you need widget B to move with widget A you should let it be a normal child widget, and handle the mouse "dragging" events on widget B if you need to move it inside widget A.