12 lines
426 B
C++
12 lines
426 B
C++
#include "srccopy.h"
|
|
#include "playwin.h"
|
|
#include <QOpenGLWidget>
|
|
#include <QBackingStore>
|
|
|
|
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);
|
|
}
|