Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0 RC, 5.6.0
-
Xcode 7.2.1, iOS 9.2.1
Description
On iOS, when I create a QOpenGLWidget and any other Qt Widget (e.g. QPushButton), the other widget is displayed as black. The bug can also be observed on iOS simulator.
Here is a minimalist code to produce the bug:
#include <QApplication> #include <QMainWindow> #include <QOpenGLWidget> #include <QPushButton> class GLWidget : public QOpenGLWidget { public: explicit GLWidget(QWidget *parent = 0) : QOpenGLWidget(parent) { } private: void initializeGL() { glClearColor(0.3f, 0.6f, 0.9f, 1.f); } void resizeGL(int width, int height) { glViewport(0, 0, width, height); } void paintGL() { glClear(GL_COLOR_BUFFER_BIT); } }; class MainWindow : public QMainWindow { public: explicit MainWindow(QWidget *parent = 0) : QMainWindow(parent) { glWidget_ = new GLWidget(this); button_ = new QPushButton("button", this); } private: void resizeEvent(QResizeEvent *) { glWidget_->setGeometry(0, 0, width(), height() - 100); button_->setGeometry(0, height() - 100, width(), 100); } private: GLWidget *glWidget_; QPushButton *button_; }; int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-54476 QOpenGLWidget doesn't work on iOS
-
- Reported
-