title: change text of textarea in qml file with c++
body: <p>Hi,</p>
  
  <p>i'm trying to make a application in QT which calculates something and output that in a specified text area.</p>
  
  <p>how can i achieve that, that i can change the text when user presses on the mousearea. I've got already the following code:</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;QtGui/QApplication&gt;
  #include &lt;QtDeclarative&gt;
  #include &lt;QGraphicsObject&gt;
  
  #include "qmlapplicationviewer.h"
  #include "eigen_function_header.h"
  
  Q_DECL_EXPORT int main(int argc, char *argv[])
  {
      QScopedPointer&lt;QApplication&gt; app(createApplication(argc, argv));
      qmlRegisterType&lt;MyObject&gt;("com.myself", 1, 0, "MyObject");
  
      QmlApplicationViewer viewer;
      viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
      viewer.setMainQmlFile(QLatin1String("qml/tw_looptijden_berekenen/main.qml"));
      viewer.showExpanded();
  
      return app-&gt;exec();
  }
  </code></pre>
  
  <p>eigen_function_header.h</p>
  
  <pre><code>#ifndef EIGEN_FUNCTION_HEADER_H
  #define EIGEN_FUNCTION_HEADER_H
  
  #include &lt;QObject&gt;
  
  class MyObject : public QObject{
     Q_OBJECT
  public:
     explicit MyObject (QObject* parent = 0) : QObject(parent) {}
     Q_INVOKABLE int reken_tijden_uit(){
  
  //        tekst_gebied
          return 1;
     }
  };
  
  #endif // EIGEN_FUNCTION_HEADER_H
  </code></pre>
  
  <p>main.qml</p>
  
  <pre><code>import QtQuick 1.1
  import com.myself 1.0
  
  Rectangle {
  
  width: 360
  height: 360
  Text {
      id: tekst_gebied
      text: qsTr("Hello World")
      anchors.centerIn: parent
  }
  MyObject {
     id: myobject
  }
  
  MouseArea {
      x: 0
      y: 0
      width: 360
      height: 251
      anchors.rightMargin: 0
      anchors.bottomMargin: 109
      anchors.leftMargin: 0
      anchors.topMargin: 0
      z: 1
      anchors.fill: parent
      onClicked: {
          console.log(myobject.reken_tijden_uit());
  
      }
  }
  
  Text {
      id: text1
      x: 96
      y: 305
      text: qsTr("text")
      font.pixelSize: 12
  }
  }
  </code></pre>