[SOLVED] Best method to display a stream of QImage's
-
Hi all, id like to know which method is the most efficient to display Qimages - i have tried both and they seem pretty similar so far and want to know if there are ways to optimize them, or different better methods to go about this.
#1 having a QLabel in my QVBoxLayout and calling:
@canvas->setPixmap(QPixmap::fromImage(img));@
whenever there is a new frame.
#2 using a QGraphicsView in my QVBoxLayout and then using
@
scene->clear();
scene->addPixmap(QPixmap::fromImage(img));
@both seem pretty CPU intensive.
Thanks, Tim. -
Thanks, i did end up doing that - except i just have a QGraphicsItem which i keep calling
@
QGraphicsPixmapItem::setPixmap(QPixmap::fromImage(img));
@Is this way going to be more or less as quick as your paint method?
also what exactly would that flag do?