summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 0282c79..8576f52 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -549,8 +549,11 @@ static int qCocoaViewCount = 0;
qwidgetprivate->syncBackingStore(qwidget->rect());
}
- // Since we don't want to use the native engine, we must exit.
- return;
+ // Since we don't want to use the native engine, we must exit, however
+ // widgets that are set to paint on screen, spesifically QGLWidget,
+ // requires the following code to execute in order to be drawn.
+ if (!qwidget->testAttribute(Qt::WA_PaintOnScreen))
+ return;
}
CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];