title: how to connect the signal to slot in pyqt5 and qml?
body: <p>following is my codes. what i want to do is that i want to change the content of <strong>"Text"</strong> in <strong>main.qml</strong> with python. so i decide to connect the signal "changeText" in python code  to  the function "setText" in qml,but i don't konw how to do this. Maybe there are some other solutions,what should  i do ?</p>
  
  <p><strong>main.py</strong></p>
  
  <pre><code>import sys
  from PyQt5.QtGui import *
  from PyQt5.QtCore import *
  from PyQt5.QtWidgets import QApplication
  from PyQt5.QtQml import *  
  
  class MyClass(QObject):
      changeText=pyqtSignal(str)
  
      def __init__(self):
          super().__init__()
  
  
  if __name__ == "__main__":
    app = QApplication(sys.argv)
    engine = QQmlApplicationEngine()
  
    con=MyClass()
    ctx = engine.rootContext()
    ctx.setContextProperty("con", con)
  
  
    engine.load('main.qml')
  
    win = engine.rootObjects()[0]
  
    con.changeText.connect(win.setText)
  
    win.show()
    sys.exit(app.exec_())
  </code></pre>
  
  <p><strong>main.qml</strong></p>
  
  <pre><code>import QtQuick 2.2
  import QtQuick.Controls 1.1
  import QtQuick.Layouts 1.1
  import QtQuick.Controls.Styles 1.3
  
  ApplicationWindow{
          visible:true
          width:940
          height:680
          id:root
          title:"markdwon editor"
      Rectangle{
          Text{               
              text:"hello"
              function setText(content)
              {
                  text=content
  
              }
          }       
      }    
  }
  </code></pre>