For both questions the same answer: you have to remove the grid layout that is used in the PlotMatrix class and implement a new method
void PlotMatrix
::layoutPlots( const QRect &rect
) {
// calculate and assign the geometries of your plots here
...
}
void PlotMatrix::layoutPlots( const QRect &rect )
{
// calculate and assign the geometries of your plots here
...
}
To copy to clipboard, switch view to plain text mode
In PlotMatrix::resizeEvent() and some other places that have an effect on the size of your plots you have to call:
layoutPlots( contentsRect() );
layoutPlots( contentsRect() );
To copy to clipboard, switch view to plain text mode
As you probably want to have the same size for the canvases ( not the plots ! ) you have to subtract the sizeHints() of the scales, legends and titles ( QwtPlot is a composite widget ! ).
Uwe
Bookmarks