Right now I'm working on a project with a very large number of configuration panels, and at the moment I have them all in tabs in a Dock Widget that can be docked/undocked/etc. with the main window. What I'd really like to do, however, is make each individual panel a dock widget, and have them tabbed together by default, but allow the user to drag them off into separate windows and/or dock them with the main window if they want. As I see it, I have two problems...

- Can I tab dock widgets together in code? As far as I can tell, the only thing I can do to explicitly dock Dock Widgets together is to put them on the same side of a Main Window, but only the user can collapse them together? Am I missing something obvious here, or is the functionality just not there?

- Can dock widgets be tabbed together when they're undocked the way they can be when they're docked with the main window?

Assuming that I can't easily do what I want with stock Qt, how difficult would it be to subclass QDockWidget to get it to do what I want?