Results 1 to 6 of 6

Thread: Parts of plot dissapear during scrolling

  1. #1

    Default Parts of plot dissapear during scrolling

    Hi,

    i created a horizontal "timing" diagram and i use a self definded symbol!

    when i scroll now a little to the right the two big bars dissapear!

    (look at the picutres)

    how can i fix that?

    timing.jpg
    timing2.jpg

    regards
    Matthias

  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: Parts of plot dissapear during scrolling

    Quote Originally Posted by myzinsky View Post
    i created a horizontal "timing" diagram and i use a self definded symbol!
    Guess you are using a QwtPlotIntervalCurve and you have overloaded QwtIntervalSymbol::draw() ?

    If so show your code - if not throw all your code away beside that couple of lines you need to implement YourIntervalSymbol::draw().

    Uwe

  3. #3

    Default Re: Parts of plot dissapear during scrolling

    Guess you are using a QwtPlotIntervalCurve and you have overloaded QwtIntervalSymbol::draw() ?
    Yes im using QwtPlotIntervalCurve and i overload draw:

    Qt Code:
    1. class timingSignal: public QwtIntervalSymbol
    2. {
    3. public:
    4. virtual void draw( QPainter * painter, Qt::Orientation o, const QPointF& from, const QPointF& to ) const
    5. {
    6.  
    7. // 2----------3
    8. // 1 / \ 4
    9. // \ /
    10. // 6------------5
    11.  
    12. QPolygonF polygon;
    13. polygon << from // 1
    14. << QPointF(from.x()+10 , from.y()-10) // 2
    15. << QPointF(to.x() -10 , to.y() -10) // 3
    16. << to // 4
    17. << QPointF(to.x() -10 , to.y() +10) // 6
    18. << QPointF(from.x()+10 , from.y()+10); // 7
    19.  
    20. ///QwtPainter::drawText(painter, from, "blubb");
    21.  
    22. QPen pen;
    23. pen.setWidth(2);
    24. // pen.setStyle(Qt::SolidLine);
    25. // pen.setBrush(Qt::red);
    26. pen.setCapStyle(Qt::SquareCap);
    27. pen.setJoinStyle(Qt::RoundJoin);
    28. painter->setBrush(QBrush(QColor(120,120,120,200),Qt::SolidPattern));
    29. painter->setPen(pen);
    30. QwtPainter::drawPolygon( painter, polygon);
    31.  
    32. }
    33.  
    34. };
    To copy to clipboard, switch view to plain text mode 
    Last edited by myzinsky; 27th June 2012 at 08:59.

  4. #4

    Default Re: Parts of plot dissapear during scrolling

    I changed it to a normal rectangle, and its the same behavior...

  5. #5
    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: Parts of plot dissapear during scrolling

    Quote Originally Posted by myzinsky View Post
    I changed it to a normal rectangle, and its the same behavior...
    1. Is the draw methods called for the missing symbol and with what coordinates ?
    2. What happens, when you disable the ClipSymbol paint attribute of the curve ?


    Uwe


    Added after 7 minutes:


    O.k. after looking into the code I see a bug related to the ClipSymbol paint attribute for horizontal symbols. In qwtIsHSampleInside() a x coordinate gets compared against yMax ( instead of xMax ).

    Disable the ClipSymbol paint attribute - or use the fix from SVN ( trunk or 6,0 branch ).

    Uwe
    Last edited by Uwe; 3rd July 2012 at 06:40.

  6. #6

    Default Re: Parts of plot dissapear during scrolling

    Qt Code:
    1. curve->setPaintAttribute(QwtPlotIntervalCurve::ClipPolygons,false);
    To copy to clipboard, switch view to plain text mode 

    did the job!
    thanks uwe!

Similar Threads

  1. how to configure only some few parts of the Qt?
    By FS Lover in forum Installation and Deployment
    Replies: 6
    Last Post: 29th November 2009, 17:13
  2. Replies: 0
    Last Post: 26th November 2009, 15:49
  3. Scrolling Dynamic Plot
    By DKL1972 in forum Qwt
    Replies: 0
    Last Post: 14th June 2008, 03:17
  4. NEED HELP: QSystemTrayIcon QMenu doesn't dissapear
    By codeslicer in forum Qt Programming
    Replies: 5
    Last Post: 10th February 2008, 03:17
  5. Replies: 4
    Last Post: 25th April 2007, 16:54

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.