Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
Sometimes one would like to be able to detach the view provided by a QDockWidget and have it behave like a normal, standalone window instead of as a tool window.
- regular windows stay visible when the application focus changes
- regular windows can do stacking and can thus go (partly) under the main window
- regular windows can be put (partly) off the screen
A good example candidate would be an embedded documentation browser.
It turns out to be very tricky to change the detached windows externally, but a quick test suggests that it's very simple in the private QDockWidget method that does the actual state change. Just set `Qt::Window|Qt::WindowMinMaxButtonsHint` instead of `Qt::Tool`.
I'd like to propose to make this behaviour optional by providing an additional flag along the lines
void setFloatsAsStandalone(bool standalone); bool floatsAsStandalone();
or
Q_PROPERTY(bool floatStandalone READ floatsAsStandalone WRITE setFloatsAsStandalone)
Let me know if you have a better suggestion for the name of the state variable and its access methods, and I'll propose a patch (against 5.9LTS if that's OK).