Well QwtPlot::updateLayout() is about adjusting the content to a given geometry, not about changing the geometry. So the posted implementation will never work !

Better try something like this:
Qt Code:
  1. class YourPlotLayout: public QwtPlotLayout
  2. {
  3. public:
  4. virtual void activate( const QwtPlot *plot,
  5. const QRectF &rect, Options options )
  6. {
  7. const QRectF rect = adjustedRect( plot, rect );
  8. QwtPlotLayout::activate( plot, adjustedRect, options );
  9. }
  10. };
To copy to clipboard, switch view to plain text mode 
and
Qt Code:
  1. plot->setPlotLayout( new YourPlotLayout() );
To copy to clipboard, switch view to plain text mode 
Then it boils down to finding an implementation for YourPlotLayout::adjustedRect(). Here you have to start with finding a square rectangle for the canvas, that has to be expanded, by the space needed for the axes, title, footer, legend.

Of course you could also try to find a complete new implementation for YourPlotLayout::activate(). In this case you would also start with the square canvas, but then you would also calculate all the other geometries yourself.

Uwe