QTabWidget: how to disable all tabs

  • I subclassed the TabBar in order to insert a checkbox close to each tab
    The checkbox permits to enable or disable a tab when its value is changed (the checkboxs remain enabled), but I figured out that when I uncheck all buttons, Qt reenables a tab. Infact about setTabEnabled(...), the doc says:

    Note that even a disabled tab/page may be visible. If the page is visible already, QTabWidget will not hide it; if all the pages are disabled, QTabWidget will show one of them.

    Now my question is How can I disable all tabs using the checkbox?

Log in to reply