QCustomPlot Discussion and Comments

how to set visibility for all items of a specefic layer?Return to overview

Hello,
I have some extra layers in my plot. I add a few items to each layer. I want to show one of these layers (and their items) at a time, so I should set the visibility of other layers to false. but I don't know how to do it. Is it possible to do something like this? Any help would be appreciated.

is there any body known the answer ??? please at least say this work doesn't support in QCustomPlot

Hi there,

I've just added that feature to the v1.2 branch, so it will be part of the next minor release. Until then, I suggest just iterating through the children of a layer and setting the visibility item by item, something like this:

for (int i=0; i<layer->children().size(); ++i)
  layer->children.at(i)->setVisible(false);

Thank you very much. I'll be waiting for the v1.2 branch.