Combine floating QDockWidgets and into a single floating window with tabs?



  • Visual Studio does this well, where you tear off a dockable widget, drag it to your other monitor, then do the same for a second dockable widget, and when you drag one floating widget on top of the other, they can combine them into a single window with a tab bar to choose between the two individual widgets. I'm looking for a solution to do that in Qt.

    Right now I have a QMainWindow, and I can combine two or more QDockWidgets to one of the four edges of my QMainWindow, but I want to do this outside of QMainWindow.

    Does anyone have experience with this, or know of any 3rd party libraries that offer this type of functionality?



  • So after some tinkering and conferring with our UI designer, really what I want is to have a window with tabs, and to be able to rip any given tab out into its own window, and to later be able to drag that window over the tabbed window and have it rejoin as its own tab again.

    I've started tinkering with a QWidget that has a QTabBar and a QStackedWidget, and I'm going to see if I can programmatically switch an existing QWidget from being part of the stacked widget to being its own window (and back again).

    If that all works, then I'll see if I can get some sort of drag visuals to convey to the user what is happening as they drag the windows/tabs around.

    I'm just winging it here, and would love to hear from anyone who may have tried something similar.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.