From 3cc2b8d7d94361ef786304024fd2ddca4103f94b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 20 Aug 2014 16:52:38 +0200 Subject: [PATCH] Avoid creating fbo with zero size in QQuickWidget Get rid of incomplete attachment warnings on Android. Change-Id: I7da546861b1814677b0c8ae110416f69bbbb7edc Reviewed-by: Paul Olav Tvete --- src/quickwidgets/qquickwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index b89c894..f203d72 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -682,6 +682,11 @@ void QQuickWidget::createFramebufferObject() { Q_D(QQuickWidget); + // Could come from Show -> createContext -> sceneGraphInitialized in which case the size may + // still be invalid on some platforms. Bail out. A resize will come later on. + if (size().isEmpty()) + return; + QOpenGLContext *context = d->offscreenWindow->openglContext(); if (!context) { -- 2.7.4