I am trying to get the QTabWidget automatically resized to fit the child tab when the child is added but have been unable to do so. I have created a form using Qt Designer and have inherited this using the single inheritance approach as follows.
class MyWidget : public QWidget
{
Q_OBJECT
public:
MyWidget(QWidget *parent = 0);
private:
Ui::MyForm ui;
};
I have a QTabWidget and I am adding the instance of the object to my QTabWidget using the addTab(). When I display the QTabWidget, I notice that it hasn't resized to fit the MyWidget instance. What do I need to do to ensure that the QTabWidget instance gets automatically resized?