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. How to set Active Tab in DockWidget?
Forum Updated to NodeBB v4.3 + New Features

How to set Active Tab in DockWidget?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 5.8k 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.
  • Z Offline
    Z Offline
    zither
    wrote on last edited by
    #1

    Dear all,

    I used as tab style to set two DockWidget Widgets in QMainWindow.
    @addDockWidget(Qt::LeftDockWidgetArea,firstDock,Qt::Vertical);
    addDockWidget(Qt::LeftDockWidgetArea,secondDock,Qt::Vertical);
    this->tabifyDockWidget(firstDock,secondDock);@

    After this, secondDock is set on the right of the firstDock & secondDock becomes current Tab.
    How can I set firstDock as current Tab without changing current order (first, second)?

    Thanks

    1 Reply Last reply
    0
    • V Offline
      V Offline
      veeeee_d
      wrote on last edited by
      #2

      Why are you using tabifyDockWidget?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rokemoon
        wrote on last edited by
        #3

        [quote author="veeeee_d" date="1320914351"]Why are you using tabifyDockWidget?[/quote]
        I think to create tabbed dock programmatically ;-)

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zither
          wrote on last edited by
          #4

          Yes, I create tabbed dock programmatically.

          I would to set (Active or Current) Tab as first Tab Dock programmatically.

          How can I do that?

          Thanks

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cincirin
            wrote on last edited by
            #5

            Quote from docs ...

            bq. Two dock widgets may also be stacked on top of each other. A QTabBar is then used to select which of the widgets that should be displayed.

            Maybe if you find this tabbar pointer ... :-) (I don't know, maybe somebody else have the solution)

            1 Reply Last reply
            0

            • Login

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