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. QTabBar with QComboBox
QtWS25 Last Chance

QTabBar with QComboBox

Scheduled Pinned Locked Moved Solved General and Desktop
qtabbarqcombobox
6 Posts 3 Posters 2.3k 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.
  • T Offline
    T Offline
    tgru
    wrote on last edited by
    #1

    I want to implement a tabbar with the tabs, then the left and right arrows for navigation (not overlapping) and then either a combobox or a button to activate a combobox with all tabs listet. The latter only in the case when not all tabs can be shown. I just need some hints/directions how to implement it: derive from QTabBar and overwrite paint etc, or replace the tabbar with a widget containing an horizontal box layout in which I insert a tabbar and the combobox, or ...

    Thanks,
    Thomas

    Ni.SumiN 1 Reply Last reply
    0
    • T tgru

      I want to implement a tabbar with the tabs, then the left and right arrows for navigation (not overlapping) and then either a combobox or a button to activate a combobox with all tabs listet. The latter only in the case when not all tabs can be shown. I just need some hints/directions how to implement it: derive from QTabBar and overwrite paint etc, or replace the tabbar with a widget containing an horizontal box layout in which I insert a tabbar and the combobox, or ...

      Thanks,
      Thomas

      Ni.SumiN Offline
      Ni.SumiN Offline
      Ni.Sumi
      wrote on last edited by Ni.Sumi
      #2

      @tgru

      I guess, Stacked widget and stacked layout would be better options. It shows one widget at time.

      http://doc.qt.io/qt-4.8/qstackedwidget.html
      http://doc.qt.io/qt-5/qstackedlayout.html

      1 Reply Last reply
      2
      • T Offline
        T Offline
        tgru
        wrote on last edited by
        #3

        I am looking for a modified QTabBar - not for displaying and controling the contents of the tabs.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          If you want that combo box after that tab bar then then custom widget with the tab bar followed by the combo box is likely the most simple way to implement it.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          3
          • T Offline
            T Offline
            tgru
            wrote on last edited by
            #5

            Thanks for this hint and I also found setCornerWidget which solves the thing in my case.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Right, that's the best solution if you are using a QTabWidget.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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