title: Transparent widget with QtQuick 2.0
body: <p>I'am trying to create a transparent window with QtQuick 2.0. </p>
  
  <p>I can create a transparent widget like that: </p>
  
  <pre><code>class TransparentWidget : public QWidget
  {
  public:
      TransparentWidget(QWidget* parent)
      : QWidget(parent)
      {
          resize(QSize(500, 500));
          setAttribute(Qt::WA_TranslucentBackground);
          setWindowFlags(Qt::FramelessWindowHint);
      }
  
      void paintEvent(QPaintEvent * event)
      {
          QPainter painter;
          QBrush brush(Qt::cyan);
          painter.begin(this);
          painter.setRenderHint(QPainter::Antialiasing);
          painter.setBrush(brush);
          painter.drawRect(0,0,100,100);
          painter.end();
      }
  };
  </code></pre>
  
  <p>Now i want to do the same thing with QQuickView, first i create it:</p>
  
  <pre><code>QQuickView view;
  view.setSource(QUrl::fromLocalFile("test.qml"));
  view.setResizeMode(QQuickView::SizeRootObjectToView); 
  </code></pre>
  
  <p>and here is my "test.qml" file: </p>
  
  <pre><code>Rectangle
  {
      width: 300;
      height: 300;
      color: "transparent";
  
      Rectangle
      {
          anchors.top: parent.top;
          anchors.left: parent.left;
          width: 50;
          height: 100;
          color: "lightsteelblue";
      }
  
      Rectangle
      {
          anchors.bottom: parent.bottom;
          anchors.right: parent.right;
          width: 50;
          height: 100;
          color: "darkgrey";
      }
  }
  </code></pre>
  
  <p>now I want to create a transparent widget and i did it like that:</p>
  
  <pre><code>QWidget *p = QWidget::createWindowContainer(&amp;view, NULL, Qt::FramelessWindowHint);
  p-&gt;setAttribute(Qt::WA_TranslucentBackground);
  p-&gt;show();
  </code></pre>
  
  <p>i create a widget with WA_TranseculentBackground and FramelessWindowHint just like the way i did with the previous one but it didn't work.</p>
  
  <p>Than go a little deeper and used pix to see whats QQuickView calling behind and i see this line:</p>
  
  <p><img src="https://i.stack.imgur.com/gHkUk.png" alt="pix output"></p>
  
  <p>now my questions:</p>
  
  <p>1 - Why Qt is calling IDirect3DDevice9::clear with color white? </p>
  
  <p>2- Is there a way to tell QQuickView or QmlEngine not to draw background anything?</p>