Results 1 to 2 of 2

Thread: How to access QwtPlotMarkers out of the itemList()?

  1. #1
    Join Date
    Jun 2008
    Posts
    17
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default How to access QwtPlotMarkers out of the itemList()?

    Hi there!

    I am trying to make some markers of a plot disappear. I am using the itemList() function to get the plotitems:

    Qt Code:
    1. foreach (QwtPlotItem* item, itemList())
    2. {
    3. if (item->rtti() == QwtPlotItem::Rtti_PlotMarker)
    4. {
    5. //if (item->lineStyle() == QwtPlotMarker::NoLine) // doesn't work because item is of type QwtPlotItem and not QwtPlotMarker
    6. item->setVisible(false);
    7. }
    8. }
    To copy to clipboard, switch view to plain text mode 

    I need to leave some line-markers visible and hide the "QwtPlotMarker::NoLine"-ones.
    How do i access the QwtPlotMarker out of the "QwtPlotItem* item"??
    Is there a way to achieve that?

    Thanks in advance...

  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: How to access QwtPlotMarkers out of the itemList()?

    Quote Originally Posted by freeman_w View Post
    How do i access the QwtPlotMarker out of the "QwtPlotItem* item"??
    That's more a C++ than a Qwt question: simply use a cast.

    Uwe

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

    freeman_w (7th November 2012)

Similar Threads

  1. Access USB from Qt???
    By webquinty in forum Qt Programming
    Replies: 5
    Last Post: 6th June 2011, 08:40
  2. Can't access dll
    By waynew in forum Newbie
    Replies: 4
    Last Post: 15th November 2010, 13:06
  3. web access
    By ashwinibm in forum Newbie
    Replies: 1
    Last Post: 15th January 2010, 10:27
  4. How To Access To Child's Of A Tab
    By hotjava in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2008, 13:21
  5. Connecting to MS ACCESS
    By berzeck in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2007, 21:30

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.