You can move tabs by accessing the QTabBar
object associated with the QTabQidget
QTabBar
has a method moveTab()
which will allow you to reorder tabs.
So you would do something like my_tab_widget.tabBar().moveTab(old_position, new_position)
where old_position
and new_position
are integers which specify the tab to move and the position to move it to respectively.
Lots of details in the c++ documentation (it translates to python pretty easily). See QTabBar docs and QTabWidget docs