Hello Everyone,

I am working on a project which uses Qt GraphicsScene API. Well i have an item in which i have to print a number of points say(100000 points) which are stored in a std::vector.

My program got some lag when it traverse and paint 100000 points., well i have done some logic that painter should draw the points which are visible on the screen.

But still the program is not that much smooth. i have tried to work with QThread, and moveToThread but unable to solve the problem.

Anyone have idea about how to paint a graphics item in a thread., or something new idea which will resolve my problem and make my program smooth.

QGraphicsView optimizations are already done by my side.

Qt Code:
  1. setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
  2. setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
  3. setCacheMode(QGraphicsView::CacheNone);
  4.  
  5. setOptimizationFlags(QGraphicsView::DontAdjustForAntialiasing
  6. | QGraphicsView::DontClipPainter
  7. | QGraphicsView::IndirectPainting);
To copy to clipboard, switch view to plain text mode