Results 1 to 3 of 3

Thread: qwt spectrogram example

  1. #1
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question qwt spectrogram example

    Hello,

    I have integrated the spectrogram example into my programm and it also works fine. Then I wanted to start adapting it for my purposes and made the member variable "d_spectrogram;" public:

    Qt Code:
    1. #include <qwt_plot.h>
    2. #include <qwt_plot_spectrogram.h>
    3.  
    4. class Plot: public QwtPlot
    5. {
    6. Q_OBJECT
    7.  
    8. public:
    9. Plot(QWidget * = NULL);
    10.  
    11. QwtPlotSpectrogram *d_spectrogram; // define it as public to be able to access it from another class
    12.  
    13. public slots:
    14. void showContour(bool on);
    15. void showSpectrogram(bool on);
    16. void printPlot();
    17.  
    18. private:
    19. //QwtPlotSpectrogram *d_spectrogram;
    20. };
    To copy to clipboard, switch view to plain text mode 

    I also have outsourced the class "class SpectrogramData: public QwtRasterData" from plot.cpp to my class and let it plot by:

    Qt Code:
    1. d_plot->d_spectrogram->setData(SpectrogramData());
    2. d_plot->showContour(true);
    To copy to clipboard, switch view to plain text mode 

    It works, but as soon as I drag a rectangle to zoom in, the whole plot disappears and appears again if I click on right mouse button to zoom out. It appears however not in the right position but the left bottom corner of the plot is in the middle of the plot widget ( see attached image). Anyway the plot can be dragged correctly and if I drag now a new rectangle to zoom in, then it works correctly. Only the right mouse button and the first zoom in don't work properly. Why?

    Thank you.

    best regards,

    Vitali
    Attached Images Attached Images

  2. #2
    Join Date
    May 2009
    Posts
    20
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt spectrogram example

    Can you show us the code you use to set up the zoomer? It's possible you didn't set the base zoom after you set your initial axes.

  3. #3
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qwt spectrogram example

    I have not changed the Zoomer class. It remains the same as in spectrogram example...

Similar Threads

  1. qwt 5.2 install on qt 4.5
    By HyperB in forum Qwt
    Replies: 4
    Last Post: 13th May 2009, 21:03
  2. Step by step Qwt on MinGW
    By Doug Broadwell in forum Qwt
    Replies: 2
    Last Post: 23rd January 2009, 01:19
  3. QWT introduction
    By nitriles in forum Qwt
    Replies: 4
    Last Post: 28th September 2007, 11:48
  4. How to upgrade Qwt 5.0.1 to Qwt 5.0.2
    By luffy27 in forum Qwt
    Replies: 1
    Last Post: 15th July 2007, 20:55
  5. use interesting QWT Library with QT3.X
    By raphaelf in forum Qwt
    Replies: 2
    Last Post: 23rd January 2006, 12:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.