freeman_w
25th October 2012, 16:00
Hi there!
I am trying to make some markers of a plot disappear. I am using the itemList() function to get the plotitems:
foreach (QwtPlotItem* item, itemList())
{
if (item->rtti() == QwtPlotItem::Rtti_PlotMarker)
{
//if (item->lineStyle() == QwtPlotMarker::NoLine) // doesn't work because item is of type QwtPlotItem and not QwtPlotMarker
item->setVisible(false);
}
}
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...
I am trying to make some markers of a plot disappear. I am using the itemList() function to get the plotitems:
foreach (QwtPlotItem* item, itemList())
{
if (item->rtti() == QwtPlotItem::Rtti_PlotMarker)
{
//if (item->lineStyle() == QwtPlotMarker::NoLine) // doesn't work because item is of type QwtPlotItem and not QwtPlotMarker
item->setVisible(false);
}
}
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...