title: QOpenGLWidget in Qt5.5 rendering QImage file
body: <p>I have a problem to render a <code>QImage</code> with a derived <code>QOpenGLWidget</code> class. If I create my own raw graphic everything works fine but I can't create a proper <code>QOpenGLTexture</code>. I see only some random pixel from memory. I tried a lot but it doesn't work. Here is my test code:</p>
  
  <pre><code>initializeGL()
  
      initializeOpenGLFunctions();
  
      glClearColor(0.0, 0.0, 0.0, 0.0);
  
      glLoadIdentity();
      glMatrixMode(GL_PROJECTION);
      glOrtho(0, this-&gt;width(), 0, this-&gt;height(), 0, 1);
      glMatrixMode(GL_MODELVIEW);
  
      glShadeModel(GL_FLAT);
  
  
  paintGL()
  
      mTexture-&gt;bind();
      glDrawPixels(mTexture-&gt;width(), mTexture-&gt;height(), QOpenGLTexture::RGBA, GL_UNSIGNED_BYTE, mTexture);
  
  loadImage()
  
      mTexture = new QOpenGLTexture(QImage::fromData(image).convertToFormat(QImage::Format_RGBA8888));
  </code></pre>
  
  <p>"image" is a <code>QByteArray</code> and works fine in a <code>QGraphicsView</code>. So it seems that I am missing something.</p>