Get tabbing order
-
Getting the widgets that are sharing the tab with your current widget is pretty easy just
QList<QDockWidget*> tabifiedDocks = mw->tabifiedDockWidgets(dock);
is needed so this is not a problem at all.
Now the issue is that I want to save this state and I didn't manage to get the order.
tabifiedDocks skips my current dock so I cannot get the order from there, also I tried to compare the geometry but it doesn't help neither.
Notice that there are lots of questions/responses about how to set the tab order but this one is about how to get it.
Thank you in advance for any tip.
-
@FrankE said in Get tabbing order:
Now the issue is that I want to save this state and I didn't manage to get the order.
QMainWindow::saveState()
should already take care of this? You just need to make sure, your QDockWidgets have a unique object name set.Otherwise you can query for the QTabBar in the dock widget, using
findChild<QTabBar*>()