Question: Say I have a tab widget which is 5 inches wide now when I add tabs to it then each tab is 1 inch wide. How can I make the tabs occupy equal length space in the widget such that each tab is 2.5 inches wide ? I am using QT Designer is there a property that I can set ?

Answer: 
The good news is that QTabBar has a property that does almost exactly what you want, namely [setExpanding](https://qt-project.org/doc/qt-4.8/qtabbar.html#expanding-prop).

The bad news is that QTabWidget effectively ignores that property, because it always forces its tabs to be the minimum size (even if you set your own tab-bar).

The best workaround would appear to be to create your own TabWidget class based on a QTabBar and a QStackedLayout. But note that this still may not expand the tabs to the fill all the available space. When I tried it, two tabs only expanded to fill two-thirds of the space - so it looks like it may always leave room for one tab at the end if it can.
```
// Qt 5.12.2
class TabWidget : public QTabWidget
{
    class TabBar : public QTabBar
    {
        QSize _size;
    public:
        TabBar(QWidget* a_parent) : QTabBar(a_parent)
        {
            setWidth(size().width());
        }
        QSize tabSizeHint(int index) const
        {
            return QSize(_size.width()/(count()?count():1), size().height());
        }
        void setWidth(int a_width)
        {
            _size = QSize(a_width, size().height());
            QTabBar::resize(_size);
        }
    };
    TabBar* _tabBar = new TabBar(this);
public:
    TabWidget(QWidget* a_parent) : QTabWidget(a_parent)
    {
        setTabBar(_tabBar);
    }

    void resizeEvent(QResizeEvent *e) override
    {
        _tabBar->setWidth(size().width());
        QTabWidget::resizeEvent(e);
    }
};

```