Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74184

Add features for QTabWidgets

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.14.1, 5.15.0

      I suggest to add four features for QTabWidget:

      1°) add a property to align the text of tabs to the left (or center or right).
      The usage should ressemble this TabWidget->setTabTextAlignement(Qt::AlignLeft);

      2°) Make this code work: TabWidget->setStyleSheet("QTabBar::tab {text-align:left; }") as an alternative for 1.

      Forums discussing these problems (1°&2°): https://openclassrooms.com/forum/sujet/qtabwidget-modifier-la-longueur-des-onglets-44498

      https://stackoverflow.com/questions/48783228/qtabwidgets-tab-text-alignment-not-working

      3°) Make the possibilty to add a button next to the last tab, to allow us to do the same as for Mozilla Firefox, on which there is a  button to add new tabs. The only paliative solution I found is setCornerWidget(m_plusTab) property.

      So the property usage should ressemble this:
      {{m_plusTab = new QPushButton("+"); }}
      {{m_plusTab->setFixedSize(30, 20); }}
      m_onglets->setNextToLastTabWidget(m_plusTab);

      Forums discussing this problem: https://openclassrooms.com/forum/sujet/qtabwidget-mettre-une-qaction-au-bout-pour-cree-un-onglet-36076

       

      4°) Add a property to QTabWidget to set the size of the tab, without using stylesheet functionnality. => Making possible to do this :

      tabWidget->setTabSize(60, 160)
      instead of this:
      tabWidget->setStyleSheet("QTabBar::tab{height:60px; width:160px}");

      Forum discussing this problem: https://forum.qt.io/topic/8186/solved-tab-size

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            navis-raven Dragoon Gryffoon
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes