kamran iranpour | 15 May 13:05
Picon

Fixed aspect ratio QwtPlotSpectrogram


Hello all,
I am plotting some data in a subclass of QwtPlotSpectrogram.
The spectrogram is inside a QMainWindow along with some plotting 
controls below it.
I want the aspect ratio of the Spectrogram to stay fixed even when the 
user resizes the MainWindow.
Currently the aspect ratio starts out wrong (the spectrogram is wider 
than it is tall even though the y range of the data is larger than the x 
range of the data), and can be changed to whatever by resizing the 
mainwindow.

How do I set the aspect ratio to be correct and keep it that way even 
though the user tries to resize the Mainwindow?

Thanks in advance for any answers!
Andreas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Uwe Rathmann | 16 May 06:30
Picon

Re: Fixed aspect ratio QwtPlotSpectrogram

On Thursday 15 May 2008 13:09, kamran iranpour wrote:

> I want the aspect ratio of the Spectrogram to stay fixed even when the
> user resizes the MainWindow.

Have a look at QwtPlotRescaler from the 5.2 SVN branch ( = trunk ). It should 
be possible to adopt it to 5.1 and to use it in your application.

Uwe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane