title: How to integrate QWidget in QML (Qt Quick 2.0)
body: <p>I have closed library that return QFrame.
  GUI of my program is developed with QML (Qt Quick 2.0).
  I need solution to integrate QFrame (QWidget) to QML</p>
  
  <p>Note:
  I found example: Qt_DIR/Examples/Qt-5.3/declarative/cppextensions/qwidgets, that do something as I need. In ths example QWidged is addeed to QGraphicsProxyWidget. I write my code like this, but when I run my aplication it show me in console: "Cannot add a QtQuick 1.0 item (MyPushButton) into a QtQuick 2.0 scene!". This is this code:</p>
  
  <pre><code>class MyPushButton : public QGraphicsProxyWidget
  {
      Q_OBJECT
      Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
  
  public:
      MyPushButton(QGraphicsItem* parent = 0)
          : QGraphicsProxyWidget(parent)
      {
          widget = new QPushButton("MyPushButton");
          widget-&gt;setAttribute(Qt::WA_NoSystemBackground);
          setWidget(widget);
  
          QObject::connect(widget, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool)));
      }
  
      QString text() const
      {
          return widget-&gt;text();
      }
  
      void setText(const QString&amp; text)
      {
          if (text != widget-&gt;text()) {
              widget-&gt;setText(text);
              emit textChanged();
          }
      }
  
  Q_SIGNALS:
      void clicked(bool);
      void textChanged();
  
  private:
      QPushButton *widget;
  };
  
  
  private:
      QPushButton *widget;
  };
  </code></pre>