Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QTabWidget - tab position.

    General and Desktop
    2
    5
    1736
    Loading More Posts
    • 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
      Mahima last edited by

      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 Reply Quote 0
      • IamSumit
        IamSumit last edited by

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

        Be Cute

        1 Reply Last reply Reply Quote 0
        • M
          Mahima last edited by

          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 Reply Quote 0
          • IamSumit
            IamSumit last edited by

            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 Reply Quote 0
            • M
              Mahima last edited by

              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 Reply Quote 0
              • First post
                Last post