Results 1 to 2 of 2

Thread: Problem with QwtPlotZoomer

  1. #1
    Join Date
    Jun 2007
    Posts
    18
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem with QwtPlotZoomer

    Hi All,

    I have a problem while zooming the selected region using QwtPlotZoomer. I am enabling the zoom mode when the RightButton of the mouse is clicked and Left Mouse button to select the region to be zoomed.I am able to zoom the selected region.But when the Right Mouse Button is clicked again,the zoom mode is disabled and the plot is coming to original position(without zoom).

    thanks,

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

    Default Re: Problem with QwtPlotZoomer

    The zoomer maintains the history of your zoom operations in a zoom stack. You can navigate on the stack with mouse and keyboard. In the default configuration the right mouse button is connected to a zoom out ( by one ) operation. So you need to change your input mode.

    F.e: the code below redefines the mouse button for the "zoom out by one" operation:
    Qt Code:
    1. zoomer->setMousePattern(QwtEventPattern::MouseSelect2, Qt::LeftButton, Qt::ControlModifier);
    To copy to clipboard, switch view to plain text mode 

    Uwe

Similar Threads

  1. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08
  2. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  3. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  4. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.