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.
setViewportUpdateMode
(QGraphicsView::BoundingRectViewportUpdate);
setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
setCacheMode(QGraphicsView::CacheNone);
setOptimizationFlags(QGraphicsView::DontAdjustForAntialiasing
| QGraphicsView::DontClipPainter
| QGraphicsView::IndirectPainting);
To copy to clipboard, switch view to plain text mode
Bookmarks