Results 1 to 3 of 3

Thread: overriding QwtSeriesData<QPointF>::boundingRect

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    52
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default overriding QwtSeriesData<QPointF>::boundingRect

    Hi,

    I am overriding this method with:
    Qt Code:
    1. return QRectF(
    2. QPointF(...),
    3. QPointF(...)
    4. );
    To copy to clipboard, switch view to plain text mode 

    Looking at the returned rectangle, I see
    (xp=2446578.0, yp=193.72, w=6793.0, h = -193.72)

    The intention is that the y axis goes from 0 to 193.72. That doesn't work with this rectangle.
    The resulting QwtPlotCurve shows a y axis with a strange range [0,1600]

    changing h to 0 gives a more reasonable output, but still from 50 to 300.

    how is the logic work on top of the bounding rectangle?

    Thanks,

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

    Default Re: overriding QwtSeriesData<QPointF>::boundingRect

    Qt Code:
    1. return QRectF( QPointF(...), QPointF(...) ).normalized();
    To copy to clipboard, switch view to plain text mode 
    Uwe

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

    alketi (4th May 2013)

  4. #3
    Join Date
    Dec 2009
    Posts
    52
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: overriding QwtSeriesData<QPointF>::boundingRect

    excellent thanks

Similar Threads

  1. Replies: 2
    Last Post: 5th March 2012, 11:53
  2. QwtSeriesData and boundingRect()
    By baray98 in forum Qwt
    Replies: 2
    Last Post: 12th January 2012, 06:49
  3. Replies: 1
    Last Post: 2nd May 2011, 18:52
  4. Replies: 1
    Last Post: 18th June 2010, 11:21
  5. Convert QwtRasterData to QwtSeriesData
    By bigjoeystud in forum Qwt
    Replies: 3
    Last Post: 25th August 2009, 15:06

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.