Results 1 to 2 of 2

Thread: QwtPlotZoomer disabled after deep zoom

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2015
    Qt products
    Unix/X11 Windows

    Default QwtPlotZoomer disabled after deep zoom

    Hello Everyone,

    I'm using QwtPlotZoomer and QwtPlotMagnifer to zoom in and out,
    If I use deep zoom using QwtPlotZoomer then it gets disabled and never used for zooming even after I zoom out using QwtPlotMagnifier.

    Here is below I have written simple constructor for QwtPlotZoomer to initialize.
    Qt Code:
    1. ZoomPlot::ZoomPlot(QwtPlot *plot):
    2. QwtPlotZoomer(plot->canvas())
    3. {
    4. //setMaxStackDepth(-1);
    5. setTrackerMode(AlwaysOff);
    6. setTrackerPen(QPen(QColor(Qt::blue)));
    7. setRubberBand(QwtPicker::RectRubberBand);
    8. setMousePattern(QwtEventPattern::MouseSelect1,Qt::LeftButton, Qt::ControlModifier);
    9. setMousePattern(QwtEventPattern::MouseSelect2, Qt::NoButton, Qt::NoModifier);
    10. setMousePattern(QwtEventPattern::MouseSelect4,Qt::NoButton,Qt::NoModifier);
    11. setMousePattern(QwtEventPattern::MouseSelect5,Qt::NoButton,Qt::NoModifier);
    12. setMousePattern(QwtEventPattern::MouseSelect6,Qt::NoButton);
    13. }
    15. void ZoomPlot::rescale()
    16. {
    17. emit autoScaleDisable(false);
    18. QwtPlotZoomer::rescale();
    19. }
    To copy to clipboard, switch view to plain text mode 

    Can someone explains why it gets disable after deep/multiple zoom in and whats the solution for this?


  2. #2
    Join Date
    Feb 2006
    Munich, Germany
    Thanked 872 Times in 820 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Re: QwtPlotZoomer disabled after deep zoom

    Quote Originally Posted by npatil15 View Post
    Can someone explains why it gets disable after deep/multiple zoom in and whats the solution for this?
    The overall limitation is the significance of doubles: But you will probably never have the maximal significance for the tick labels and you will end up sooner or later in having identical values.

    But if you like to disable the feature:

    Qt Code:
    1. class YourZoomer : public QwtPlotZoomer
    2. {
    3. ....
    5. QSizeF minZoomSize() const override
    6. {
    7. return QSizeF( -1.0, -1,0 );
    8. }
    9. };
    To copy to clipboard, switch view to plain text mode 
    Note, that you Qwt is open source and you can always help yourself by looking into the code.


  3. The following user says thank you to Uwe for this useful post:

    npatil15 (19th February 2019)

Similar Threads

  1. Replies: 4
    Last Post: 12th January 2016, 07:36
  2. Zoom out with QwtPlotZoomer
    By vonheld in forum Newbie
    Replies: 0
    Last Post: 28th August 2015, 00:20
  3. QwtPlotZoomer- problem with zoom out
    By GG2013 in forum Qwt
    Replies: 2
    Last Post: 2nd September 2013, 00:11
  4. Replies: 5
    Last Post: 18th July 2012, 09:17
  5. Replies: 3
    Last Post: 10th October 2011, 16:55

Tags for this Thread


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.