qt/LedOK/player/srccopy.cpp

12 lines
426 B
C++
Raw Permalink Normal View History

2024-02-21 18:08:50 +08:00
#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);
}