title: return python dict to QML (PySide2)
body: <p>I'm trying to find a way to return a python dictionary from a PySide2.QtCore.Slot.</p>
  
  <p><strong>main.py</strong>   </p>
  
  <pre><code>import sys
  from PySide2.QtCore import QObject, Slot
  from PySide2.QtGui import QGuiApplication, QQmlApplicationEngine
  
  class Backend(QObject):  
      def __init__(self, parent=None):
          return super().__init(parent)
  
      @Slot(result=QObject)
      def get_data(self):
          data = {}
          data["info1"] = "some information"
          data["info2"] = "some  more information"
          data["info3"] = 42
          return data
  
  if __name__ == '__main':
      BACKEND = Backend()
      APP = QGuiApplication(sys.argv)
      ENGINE = QQmlApplicationEngine(APP)
      ENGINE.rootContext().setContextProperty('backend', BACKEND)
      ENGINE.load("main.qml")
      sys.exit(APP.exec_())
  </code></pre>
  
  <p><strong>main.qml</strong>:  </p>
  
  <pre><code>import QtQuick 2.4
  import QtQuick.Controls 1.4
  
  ApplicationWindow {
   id: root
   width: 640
   height: 480
   visible: true
   color: "#F0F0F0"
   title: qsTr("Test")
  
   Text {
       anchors.centerIn: parent
       text: backend.get_data()["info1"]
   }
  } 
  </code></pre>
  
  <p>I think it is somehow done in QAbstractItemModel.roleNames() as it returns a <code>QHash&lt;int, QByteArray&gt;</code>?</p>
  
  <p>If it doesn't work like this, can anyone please support me with "the correct way" of exchanging inforamtion between the python backend and the QML frontend?</p>
  
  <p>Thanks in advance :)</p>