Results 1 to 8 of 8

Thread: Disconnection in the curve...

  1. #1
    Join Date
    Jan 2014
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Disconnection in the curve...

    I am facing a problem when using qwtdirectpainter in my application..I am drawing my curve using qwtdirectpainter class..When the curve is getting plotted,if by chance a tooltip appears on the curve from other applications,and if i remove the tooltip then i find that the curve is getting disconnected...For example i am having many windows open on my desktop..I am plotting a curve on qwtplot widget which is the maximised window.If i place my mouse cursor on any minimised window,then we know that a tooltip describing that window appears..If by chance that tooltip covers the curve i am plotting and then after if i move the mouse cursor so that tooltip disappears,then i find that the curve which is getting plotted gets disconnected and plotting gets continued with some shift..The same observation i had when using the oscilloscope example...How to solve this problem?Thank you...

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

    Default Re: Disconnection in the curve...

    Is the effect gone, when you enable the QwtPlotCanvas::ImmediatePaint flag ?

    Uwe

  3. #3
    Join Date
    Jan 2014
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disconnection in the curve...

    The effect still exists even after enabling immediatepaint flag..is there something to do with the size of plotcanvas? Like when tooltip is removed to show the plotwidget again...the size of plotcanvas is getting effected and there is a shift in drawing plot?

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

    Default Re: Disconnection in the curve...

    Without a small compilable example it is hard to say something useful.

    Uwe

  5. #5
    Join Date
    Jan 2014
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disconnection in the curve...

    I am attaching snapshots depicting the situation i am facing during real-time plotting using QwtPlotDirectPainter class.

    image1.png->It is the expected curve.
    image2.png->here tootltip appears on the curve due to mouse movement during real-time plotting at around 102 seconds.
    image3.png->the shift in the curve can be seen in the plotwidget when the tooltip is removed.


    I have enabled these flags on my plot canvas.

    canvas()->setPaintAttribute(QwtPlotCanvas::BackingStore, true);

    #if defined(Q_WS_X11)

    // Even if not recommended by TrollTech, Qt::WA_PaintOutsidePaintEvent
    // works on X11. This has a nice effect on the performance.

    canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true);

    if (canvas()->testPaintAttribute( QwtPlotCanvas::BackingStore ) )
    {
    canvas()->setAttribute(Qt::WA_PaintOnScreen, true);
    canvas()->setAttribute(Qt::WA_NoSystemBackground, false);
    }

    #endif

    What is to be done to avoid this disconnection of the curve?

    image1.jpgimage2.jpgimage3.jpg

  6. #6
    Join Date
    Jan 2014
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disconnection in the curve...

    Hi Uwe.. I had the same observation of shift in the curve in oscilloscope example also when i enable the backingstore option..I am using qwt6.0.1 and qt 4.7 on linux.I ran your oscilloscope example with setting backingstore flag to true with no other changes..I observed that when any tooltip appears on the curve,the curve is getting shifted..Please look into this issue..I am attaching the sanpshots..thank you...

    im1.jpgim2.jpg

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

    Default Re: Disconnection in the curve...

    What happens when running the application with "-graphicssystem raster" and/or disabling the Qt::WA_PaintOutsidePaintEvent ?

    Uwe

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

    siraj (25th April 2014)

  9. #8
    Join Date
    Jan 2014
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Disconnection in the curve...

    Thank you Uwe...the problem got solved after disabling both Qt::WA_PaintOutsidePaintEvent and backingstore..

Similar Threads

  1. Replies: 1
    Last Post: 29th September 2013, 09:12
  2. Replies: 4
    Last Post: 29th April 2010, 06:11
  3. Notification for network disconnection
    By yogesh in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2009, 06:55
  4. SIGNALS and SLOTS disconnection
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2007, 07:01
  5. QTcpSocket disconnection problem
    By erdi in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2006, 21:50

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.