Hello,
I am working with QGraphicsView and QGraphicsScene for drawing of QPixmap data on QGraphicsItem.
What i am doing is start a QTimer on each timeout of QTimer i draw data on QPixmap via QtConcurrent.
QtConcurrent::run(this, &LinePlotter::plotDataOnImage);
QtConcurrent::run(this, &LinePlotter::plotDataOnImage);
To copy to clipboard, switch view to plain text mode
On plotDataOnImage i call update() after drawing on QPixmap.
It works fine but unfortunatly my QGraphicsView and QGraphicsScene stop getting paint events.
but when i click on window it repaint again but it does not repaint on call of update() method.
customizations for QGraphicsView i have made are:
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setRenderHints(QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
setCacheMode(QGraphicsView::CacheNone);
setOptimizationFlags(QGraphicsView::DontAdjustForAntialiasing
| QGraphicsView::DontClipPainter
| QGraphicsView::IndirectPainting);
To copy to clipboard, switch view to plain text mode
I have never got this kind of problem before but i dont know why my view not get its paint event properly.
any idea about the problem?
-----------------------------------------------
There is something i have seen i just start my application and keep it opened without any mouse interaction or any other kind of interactions.
Then i start my stop watch and checks the log.
It also got stop painting(stop getting events) when keeping in background (rarely occured)...
What is the issue?
I am using Cent OS 6.4
Qt 5.0
Please tell me what is the issue?
Bookmarks