Problem with QLineSeries
I have a variable of the type QLineSeries. I add every second a new value and I want to keep not more than 10 values at the same time.
That means, if I insert value number 11, the first value has to be removed, the second value is the new first, third is now second, ...
Can anyone help me? I tried to use removePoints() or remove() but without success.
I have never used
QLineSeriesor any of the related classes but as nobody has replied yet I'll just go ahead and write down my thoughts...
Looking at the documentation there doesn't seem to be any method that implements the behavior that you are describing. Hence you'll have to do it yourself.
May I ask what exactly the problem was that you faced? It should only be a matter of correctly using
Using pointsVector was a good hint! Thanks for the help!
Can you please mark this topic as solved if you feel that your question has been answered?
Guide for that: https://forum.qt.io/topic/62700/hitchhiker-s-visual-guide-to-the-qt-forum