I tried, the title bar is automatically removed by default but then you must reshow it to undock and you don't have the cross on the tab bar, that looks to be basic behavior of Qt, just the automatic hiding added. The example shown in this topic add the cross and allows undock when click on the tab name and automatic hide the titlebar.
Stuff can be changed :
- less empty line in code.
- empty code in destructor is not needed (DetachableDock::~DetachableDock()).
- friend is not necessary to be used in DetachableDock, a lot of professionnal dislike to use friend, I'm in the group.
- why pointer for tabBarList of DetachableDockManager ?
- That's better to write DetachableDock generic and inherit it for the sample.
- I would prefer include the code of SyntheticMouseEvent inside global namespace of DockManager since that's the only place used.
Bookmarks