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

QTabWidget: Provide API for hiding tabs

    XMLWordPrintable

Details

    • 556712f511a02ff8101e648d2e6f0090231d4f3d (qt/qtbase/5.15), 83e92e255 (dev), b4384dab0 (6.6), 22ab737dd (tqtc/lts-6.5)

    Description

      It would be very useful if there would be an API for controling the visibility of tabs in a TabWiget without removing and reinserting the tab pages so that the hiden pages are not visible in the tab bar. QTabWidget should remember the position, and any associated information with the tab itself without the developer having to store this themselves.

       

      like the "enable/disable" API:

      void QTabBar::setTabVisible(int index, bool visible);
      bool QTabBar::isTabVisible(int index) const;
      

      The suggestions using removeTab and insertTab in order to hide and show tab pages is not very developer friendly, as indexes are changes for succeeding tabs and the developer needs to maintain an index map and all the inforamtion of the tab page.

      QTabWidget should remember the position, and any associated information from the tab itself without the developer having to store this themselves.

       

       

       

       

      Attachments

        Issue Links

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

          Activity

            People

              jordipujol Jordi Pujol
              bacher Andreas Bacher
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change