in my case both widgets are window and normally they don't overlap unless you put one over another.
i have made the "control bar" parent by calling setParent(this, Qt::Window) on it.
how can i make the z-order normal so that the control bar (parent) will not stay always behind the child widget?
edit:
I got the answer here.
Bookmarks