Results 1 to 2 of 2

Thread: How to access canvas and eventFilter() for QwtPlot Spectrogram? [SOLVED]

  1. #1
    Join Date
    Dec 2011
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    12
    Thanked 2 Times in 2 Posts

    Default How to access canvas and eventFilter() for QwtPlot Spectrogram? [SOLVED]

    I'm trying to override the mouse buttons and mouse-wheel to provide *specific*, custom functionality.

    For a QwtPlot, I was overriding the eventFilter() and checking for QEvent::Wheel, and then implementing a custom zoom.

    The issue is, QwtPlotSpectrogram doesn't have a this->canvas() from which to grab the events, nor a this->invTransform() to implement some of the functionality I was using in a plain QwtPlot.

    The functionality I want to implement (accessed via eventFilter()) can be seen here in this thread: http://www.qtcentre.org/threads/5463...-zoom-(How-To)

    Is there a way to access the canvas() and invTransform() features from inside of a QwtPlotSpectrogram?

    TIA

    Edit: Nevermind!!! I figured it out. I just derive from QwtPlot and create the QwtPlotSpectrum inside a QwtPlot. Simple really.
    Last edited by alketi; 21st May 2014 at 22:17.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 879 Times in 827 Posts

    Default Re: How to access canvas and eventFilter() for QwtPlot Spectrogram? [SOLVED]

    See QwtPlotItem::plot() - QwtPlotSpectrogram is derived from QwtPlotItem.

    Uwe

Similar Threads

  1. QwtPlotSpectrogram and QwtRasterData
    By jesse_mark in forum Qwt
    Replies: 10
    Last Post: 5th February 2013, 14:59
  2. XYZ tracker for QwtPlotSpectrogram
    By epsilon in forum Qwt
    Replies: 2
    Last Post: 5th September 2012, 04:53
  3. Adding a layer to QwtPlotSpectrogram
    By DizzyMoods in forum Qwt
    Replies: 1
    Last Post: 27th August 2012, 08:28
  4. Replies: 3
    Last Post: 18th May 2012, 12:11
  5. Google map on QwtPlotSpectrogram
    By sagittager in forum Qwt
    Replies: 4
    Last Post: 15th October 2011, 15:32

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
  •  
Qt is a trademark of The Qt Company.