#include "srccopy.h" #include "playwin.h" #include #include SrcCopy::SrcCopy(QWidget *parent, QWidget *master) : QWidget{parent}, master(master) { connect(PlayWin::self->gl, &QOpenGLWidget::frameSwapped, this, (void(SrcCopy::*)())&SrcCopy::update); } void SrcCopy::paintEvent(QPaintEvent *) { master->render(backingStore()->paintDevice(), pos(), QRegion(), DrawChildren|IgnoreMask); }