void myQLabel::setNextFrame(unsigned char *bitmap){ memcpy(image, bitmap, size); QCoreApplication::postEvent(this, new QEvent(QEvent::Paint));}void myQLabel::paintEvent(QPaintEvent *e){ some_image_transformation(image); QPixmap pixmap = QPixmap::fromImage( image ); QPalette palette; palette.setBrush(backgroundRole(), QBrush(pixmap)); setPalette(palette);}
QCoreApplication::postEvent(this, new QEvent(QEvent::Paint));
void QWidget::update(){ if (updatesEnabled() && isVisible()) { if (testAttribute(Qt::WA_WState_InPaintEvent)) { QApplication::postEvent(this, new QUpdateLaterEvent(rect()));//...