Quote Originally Posted by lni View Post
Is there a way to solve this?
The way I did it is that I wrapped every detachable widget in another object (call it Window or sth like that) that has an interface similar to QWidget and whenever I want to do something on my widget, I call it through this interface. This gives me a wrapper both when the window is in the MDI area (a.k.a. has a QMdiSubWindow instance) or not. Then I can assign a keyboard shortcut or a context menu handler to all widgets I want and attach the window from there.