Drawing Images in Widget PaintEvent using existing buffer
Unsolved
General and Desktop
-
Hi,
I need to draw Image on a widget without performing any copy operation.
Please refer code below//supposed to be called 30 times a second. BaseWidget::getImageData(uchar* buf, size_t size) { //copy happening here. m_pQPixmap->loadFromData(buf,size,"BMP"); this->update(); } BaseWidget::paintEvent() { ... painter.drawPixmap(rect,*m_pQPixmap, m_pQImage->rect()); ... }
Related To: https://forum.qt.io/topic/87175/qwidget-flickering-for-frame-by-frame-streaming-of-video/11
-
Hi,
See my answer one the other thread.