PDA

View Full Version : Prevent reordering of DockWidget Tabs



FelixB
18th July 2016, 10:15
Hello,

since 5.6 it is possible to reorder Tabs of tabbed DockWidgets. Is there a way to forbid this? In our Application, we have a "special" DockWidget which is supposed to be always at the right side (like the "+"-button in Firefox). We enforce this programmatically when a new Widget gets added.

So, I need a way to disable reordering of dockwidget tabs oder a slot to react on a changed order of tabs. Any hints?

thanks!
Felix

anda_skoa
18th July 2016, 11:13
I don't see anything explicit but you could look for the QTabBars in the widget hierarchy and set their movable properties to false.

Assuming this uses QTabBar, you'll have to check the QMainWindow code https://code.woboq.org/qt5/qtbase/src/widgets/widgets/qmainwindow.h.html

Cheers,
_