Code Snippet: Qt Dockwidget Tab Click Simulation

If you have used dock widgets in Qt, you may have docked with with tabs for easy stacking of other dock widgets. One handy feature of the tabs is when you click on the active tab, it will collapse the dock area and clicking a tab will expand it again. One thing however that...