title: QML, Qt 4.8: How to enable openGl and Chromeless at the same time?
body: <p>So here is my main</p>
  
  <pre><code>#include &lt;QtGui/QApplication&gt;
  #include &lt;QtOpenGL&gt;
  #include &lt;QDeclarativeView&gt;
  #include &lt;QDeclarativeEngine&gt;
  #include "mainwindow.h"
  
  int main(int argc, char *argv[])
  {
      // Depending on which is the recommended way for the platform, either use
      // opengl graphics system or paint into QGLWidget.
      #ifdef SHADEREFFECTS_USE_OPENGL_GRAPHICSSYSTEM
          QApplication::setGraphicsSystem("opengl");
      #endif
  
          QApplication a(argc, argv);
  
      #ifndef SHADEREFFECTS_USE_OPENGL_GRAPHICSSYSTEM
          QGLFormat format = QGLFormat::defaultFormat();
          format.setSampleBuffers(false);
          format.setSwapInterval(1);
          QGLWidget* glWidget = new QGLWidget(format);
          glWidget-&gt;setAutoFillBackground(false);
      #endif
  
          MainWindow w(glWidget);
      w.show();
  
      return a.exec();
  }
  </code></pre>
  
  <p>and files I use to open QML</p>
  
  <pre><code>#include "mainwindow.h"
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent)
  {
      setAttribute(Qt::WA_OpaquePaintEvent);
      setAttribute(Qt::WA_NoSystemBackground);
    setAttribute(Qt::WA_TranslucentBackground);
    setStyleSheet("background:transparent;");
    qmlRegisterType&lt;QGraphicsBlurEffect&gt;("Effects",1,0,"Blur");
    /* turn off window decorations */
    setWindowFlags(Qt::FramelessWindowHint);
  
  
  
    ui = new QDeclarativeView;
    ui-&gt;setSource(QUrl("qrc:/assets/ui.qml"));
  
   // ui-&gt;setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
  
  
    setCentralWidget(ui);
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  #include &lt;QtDeclarative&gt;
  #include &lt;QtDeclarative/QDeclarativeView&gt;
  
  namespace Ui {
      class MainWindow;
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  private:
      QDeclarativeView *ui;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>
  
  <p>I try to enable Open GL But I see nothing, when I comment lines in main that in my opinion had to do the job i SEE MY CHROMELESS WINDOW BUT also </p>
  
  <pre><code>Qml debugging is enabled. Only use this in a safe environment!
  ShaderEffectItem::paint - OpenGL not available 
  </code></pre>
  
  <p>What do I do wrong?</p>