Results 1 to 3 of 3

Thread: Zoom to simply widen the widget on a scroll pane

  1. #1
    Join Date
    Dec 2012
    Posts
    8
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Zoom to simply widen the widget on a scroll pane

    Hello!
    I've been trying to do a simple (I think) thing:
    I've got a QScrollArea with my Plot widget (which derive from QwtPlot) attached. I want to zoom in/out with specific pushbuttons. Is it possible, that the "zooming" would only widen the whole widget, so the scroll area would widen also, and I would just scroll with scrollbars to see other kind of a plot? In other words: the push button would change (widen) the "step" of the axis div. The idea looks very simple to me, but I cannot find (or think) a simple way to do it.
    I know that there are things like QwtPanner and Magnifier and Zoomer, or the ScrollZoomer class in "Realtime" example, but this all seems to me like a "triumph of form over content".
    Oh, and right now I'm interested in horizontal zoom only, but I think it shouldn't make much difference.
    Thanks in advance!

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

    Default Re: Zoom to simply widen the widget on a scroll pane

    Quote Originally Posted by dontgonearthecastle View Post
    I've got a QScrollArea with my Plot widget (which derive from QwtPlot) attached.
    Bad idea you will have a horrible performance running out of of memory, when you zoom in deep.
    Have a look at the realtime example that uses scrollbars without these problems.

    Uwe

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

    dontgonearthecastle (3rd December 2012)

  4. #3
    Join Date
    Dec 2012
    Posts
    8
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Zoom to simply widen the widget on a scroll pane

    Ohh, right. I forgot that in my case the whole graph would be reploted everytime.
    Well, you convinced me, thanks a lot

Similar Threads

  1. Replies: 8
    Last Post: 2nd February 2012, 20:52
  2. Replies: 1
    Last Post: 3rd August 2011, 02:14
  3. Replies: 0
    Last Post: 29th November 2010, 06:34
  4. Replies: 2
    Last Post: 13th January 2009, 05:32
  5. Stacked Widget Scroll
    By csvivek in forum Qt Programming
    Replies: 6
    Last Post: 27th May 2008, 12:36

Tags for this Thread

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.