qtqtcharts

How to change the z-index of QLineSeries?


Is there any way to order the z-index for some of my QAbstractSeries added to QChart? It seems that QChart does it internally.


Solution

  • The problem is that the Q*Series implementations generate independent QGraphicsItems. These are hidden in the private implementation of the series. There is no easy way to access them from the outside.

    You could theoretically find them through the scene object (e.g. QGraphicsScene::items()). However I don't see a good way to identify them.

    For reference, you can find the class in question here.