Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.3.2
-
None
-
Windows 7 64bit ( Qt 5.3.2 MSVC2013 32bit )
Description
When trying to group QQuickWidget with another widget in layout warning show up and QQuickWidget is not shown.
It depends what is in QML file ( Rectangle alone is OK, Item is not )
Output is:
QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObject: Framebuffer incomplete attachment. QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
Example program
#include <QtGui> #include <QtWidgets> #include <QDebug> #include <QQuickWidget> class View : public QMainWindow { Q_OBJECT public: View() { QQuickWidget *quickWidget = new QQuickWidget(this); quickWidget->setSource(QUrl(QStringLiteral("qrc:/main.qml"))); QVBoxLayout *vbox = new QVBoxLayout; QTableView *tableView = new QTableView(this); vbox->addWidget(quickWidget); // When adding new widget -> quickWidget shows warning and does not show up // When alone in vbox -> OK vbox->addWidget(tableView); QWidget *centralWidget = new QWidget(this); centralWidget->setLayout(vbox); setCentralWidget(centralWidget); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); View view; view.show(); return a.exec(); } #include "main.moc"
Example QML ( must contain Item element, rectangle alone is working )
import QtQuick 2.3 Item { Rectangle { width: 100 height: 62 color: "red" } }