I have an application showing QwtPlot widgets inside a QScrollArea.

I have the following code defining my scrollable container:

Qt Code:
  1. holder = new QWidget(ui.groupBoxChart);
  2.  
  3. myVerticalLayout = new QVBoxLayout(holder);
  4. ui.scrollArea->setWidgetResizable(true);
  5. ui.scrollArea->setWidget(holder);
To copy to clipboard, switch view to plain text mode 

When the user checks a checkbox deciding which plot to display, this code is called:
Qt Code:
  1. MyPlot *newPlot = new MyPlot(ui.scrollArea);
  2.  
  3. myVerticalLayout->addWidget(newPlot);
  4.  
  5. newPlot->show();
To copy to clipboard, switch view to plain text mode 

When the user checks a different checkbox, the code hides any displayed plots with hide();

Currently the behavior I get is -
* the first time a plot is shown it is shrinked to fit the size of the scroll area *without* scrollbars displayed.
* after checking a different check box and then checking the first one again (causing hide and then show) the plot is redisplayed larger than the scroll area (thus causing the scrollbars to appear).

I would like to understand what causes this, and then decide how i want it to behave.