My program performs a calculation and outputs a few schematics, drawn onto a label (using QPixmap
). I show a label on every tab.
When the next calculation is done and the drawings are smaller, I want the size of the tabs to decrease as well. But that does not happen. The tab size stay the same.
I first remove all previous tabs with removeTab(
) and then create the new tabs. The only thing that is not removed is the QTabWidget
itself of course.
When starting with small drawings, the tab size increases with larger drawings. But it doesn't work the other way round.
How can I fix this? The following code does not work:
layout_tabs = new QTabWidget;
layout_tabs->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
I am using QT-4.8.4.