Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.2.1
-
None
-
Android 4.2.2, armv7
Description
Using a QGLWidget in a QMainWindow with a layout crashes on startup on an Android device. It works fine on my desktop computer.
#include <QApplication> #include <QMainWindow> #include <QVBoxLayout> #include <QGLWidget> int main (int argc, char *argv[]) { QApplication app (argc, argv); QMainWindow mainwindow; QWidget *centralwidget = new QWidget (&mainwindow); QVBoxLayout *layout = new QVBoxLayout (centralwidget); QGLWidget *glwidget = new QGLWidget (centralwidget); layout->addWidget (glwidget); mainwindow.setCentralWidget (centralwidget); mainwindow.show (); return app.exec (); }
This code crashes when calling mainwindow.show (). It looks like there are infinite recursive calls between QWidget::create and QWidgetPrivate::createWinId leading to a stack overflow. Sorry, I cannot get the full backtrace from Qt Creator.