QCustomPlot Discussion and Comments

Bug: Right mouse click enables Antialisaing for not antialiased elementsReturn to overview


I use the following Antialisasing settings for my plot:


A mouseReleaseEvent() turns aliasing on for the graph although antialiasing is disabled for all objects. If I remove the line setNoAntialiasingOnDrag(true), then everything works like expected.

I debugged the code and I think the problem is located here:

void QCPAxisRect::mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos)
  mDragging = false;
  if (mParentPlot->noAntialiasingOnDrag())

I have same problem

Hello Uwe, thanks for the report.

Do you call the "setNotAntialiasedElements(QCP::AntialiasedElement::aeAll);" in between the mousePress and the mouseRelease event? Actually the mAADragBackup/mNotAADragBackup should restore the state of the antialiasing/notantialiasing groups perfectly to the state before the mousePress. I'll have a closer look nevertheless.

Out of interest: What is the use case for having all elements not-antialiased, and at the same time enabling the setNoAntialiasingOnDrag?


the user, or the programmer that uses our plot derived from QCustomPlot, may enable or disable AntiAliasing but no matter what the user selects, AntiAliasing shall always be disabled for Drag operations because we work with large data sets (4 Million pooints and more).

I can't reproduce this behavior.
Could you post the code where you set the the AA/noAA elements?
Also, try to output (via qDebug) the internal members mAntialiasedElements and mNotAntialiasedElements of the QCustomPlot instance, before and after the drag (you might have to cast them to int, which is fine).