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. QTabWidget - tab position.
QtWS25 Last Chance

QTabWidget - tab position.

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.0k Views
  • 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.
  • M Offline
    M Offline
    Mahima
    wrote on last edited by
    #1

    Hi,

    I am working with QtabWidget.
    I need to implement some thing like : There should be two tabs, one tab should always be at the left most and another tab should always be at the right most of QtabWidget and rest of the tabs which will be added dynamically should be added between these two tabs.

    I am not sure whether the above is possible or not. If possible then how ?

    If anyone is having any idea?

    Maahi

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      Hii,
      Qt also provides QTabBar
      see here
      http://qt-project.org/doc/qt-5/QTabBar.html#details

      Be Cute

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mahima
        wrote on last edited by
        #3

        Thanks for your response.

        But I need the tab should always be at the right most of the tabwidget or tabbar.
        If there are only two tabs , then one should be at the right most and another should b left most and there should be gap between them and if the third tab is added then it should be added between the two tabs.

        Maahi

        1 Reply Last reply
        0
        • IamSumitI Offline
          IamSumitI Offline
          IamSumit
          wrote on last edited by
          #4

          I guess for that purpose you can create a list of QPushButton using QList<QPushButton*>

          From Docs:
          In QList<T> Items can be added at either end of the list using QList::append() and QList::prepend(), or they can be inserted in the middle using QList::insert(). More than any other container class, QList is highly optimized to expand to as little code as possible in the executable. QStringList inherits from QList<QString>.
          hope it helps.

          Be Cute

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mahima
            wrote on last edited by
            #5

            I think the above will not solve my problem.
            I need something like only one tab in the tab widget should be added to the right most of the widget and rest of the tabs should be at the left.

            Do you have any idea about this?

            Maahi

            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