Only set WA_PaintOnScreen when doing custom painting

This commit is contained in:
baldurk
2016-11-14 17:41:45 +01:00
parent 411815a300
commit dc982d519b
+2 -2
View File
@@ -33,7 +33,6 @@ CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent)
m_Ctx = NULL;
m_Output = NULL;
setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_PaintOnScreen);
setMouseTracking(true);
}
@@ -42,7 +41,8 @@ CustomPaintWidget::CustomPaintWidget(CaptureContext *c, QWidget *parent) : QWidg
m_Ctx = c;
m_Output = NULL;
setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_PaintOnScreen);
if(c)
setAttribute(Qt::WA_PaintOnScreen);
setMouseTracking(true);
}