Results 1 to 2 of 2

Thread: oscilloscope example bug

  1. #1
    Join Date
    Jan 2010
    Location
    Ankara - TURKEY
    Posts
    30
    Thanks
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default oscilloscope example bug

    Hi All,

    Please try below and see inconsistent behaviour,

    In plot.cpp change setPen function for d_curve like below;

    QPen pen;
    pen.setStyle(Qt:otLine);
    pen.setWidth(3);
    d_curve->setPen(pen);

    Then build oscilloscope and run.
    Then configure frequency and amplitute to 0. Why my pure line plotting Solid. I have configured to be Dotted but plotter plotting my line dotted. When plotting change the resolution and now you will see solid line gets dotted after called direct_painter->reset() command.

    What do you think about this situation?

    regards.

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

    Default Re: oscilloscope example bug

    When the points are painted one by one only the line between the new and the previous point is painted. In the example the distances are too small and the resulting line is always smaller than one dot. Decreasing the displayed interval and increasing the sample interval (or having an amplitude) will increase the distance between the points and you might see dots.

    The situations where you can see dots is, when several points of the curve (polygon) are painted. But this is exactly not what you want to have if you enable incremental painting. So there is no solution.

    Also note that not using a pen width of 0 slows down painting. But rendering an antialiased dotted line is a real performance killer. So if you have many points better don't do this.

    Uwe

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

    umituzun84 (17th March 2010)

Similar Threads

  1. Qwt-5.3.0-svn: oscilloscope
    By PaceyIV in forum Qwt
    Replies: 2
    Last Post: 14th June 2009, 19:56
  2. use qt for oscilloscope
    By dycjiaoda in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2009, 20:46

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.