Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get tabbing order
Qt 6.11 is out! See what's new in the release blog

Get tabbing order

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FrankE
    wrote on last edited by
    #1

    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.

    raven-worxR 1 Reply Last reply
    0
    • F FrankE

      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.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @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*>()

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved