title: Address text element on .qml
body: <p>I would like to change a text in my gui. I can address the ListView element for which I have found a solution.</p>
  <p>I would also like to address the text element arbitrarily and, for example, replace the text.</p>
  <p>Also, I can't manage to address another ListView element with different content.</p>
  <p>Here is my little program. Please excuse my English too
  <code>main.py</code></p>
  <pre><code>import sys
  import vensoft_main
  from time import sleep
  import urllib.request
  from pathlib import Path
  from PySide6 import QtCore, QtWidgets, QtGui
  from PySide6.QtQuick import QQuickView
  from PySide6.QtCore import QStringListModel, QUrl
  from PySide6.QtGui import QGuiApplication
  from PySide6.QtWidgets import QApplication
  import json
  import sys
  from typing import Text
  import urllib.request
  import json
  import pandas as pd 
  import random
  
  if __name__ == '__main__':
      # get our data
      url = &quot;file:///Users/joerg/Documents/python/Rohertrag/rohertrag_fenster/output_heute.json&quot;
      response = urllib.request.urlopen(url)
      data = json.loads(response.read().decode('utf-8'))
      
      # Format and sort the data
      data_list = list(data.values())
      
      # Set up the application window
      app = QGuiApplication(sys.argv)
      view = QQuickView()
      view.setResizeMode(QQuickView.SizeRootObjectToView)
      view.update()
  
      # Expose the list to the Qml code
      my_model = QStringListModel()
      my_model.setStringList(data_list)
      view.setInitialProperties({&quot;myModel&quot;: my_model}) 
  
  
      # Load the QML file
      qml_file = Path(__file__).parent / &quot;view.qml&quot;
      view.setSource(QUrl.fromLocalFile(qml_file.resolve()))
     
      # Show the window
      if view.status() == QQuickView.Error:
          sys.exit(-1)
      view.show()
      view.update()
     
      # execute and cleanup
      app.exec()
      del view
  </code></pre>
  <p><code>new.qml</code></p>
  <pre><code>import QtQuick
  import QtQuick.Controls
  Page {
      width: 640
      height: 480
  
      Rectangle {
          id: root
  
          anchors.fill: parent
  
          ListView {
              id: view_1
  
              anchors.fill: parent
              anchors.margins: 25
              anchors.bottomMargin: 230
              anchors.rightMargin: 375
              model: manager.model
  
              delegate: Text {
                  anchors.leftMargin: 50
                  font.pointSize: 15
                  horizontalAlignment: Text.AlignHCenter
                  text: display
              }
  
          }
  
          Text {
              id: text1
  
              x: 486
              y: 46
              width: 127
              height: 118
              text: manager.text
              font.pixelSize: 12
          }
  
          ListView {
              id: view_2
              anchors.fill: parent
              anchors.margins: 25
              anchors.leftMargin: 25
              anchors.topMargin: 238
              anchors.rightMargin: 375
              delegate: Text {
                  text: display
                  horizontalAlignment: Text.AlignHCenter
                  anchors.leftMargin: 50
                  font.pointSize: 15
              }
              anchors.bottomMargin: 17
              model: manager.model
          }
  
          Text {
              id: text2
              x: 479
              y: 272
              width: 127
              height: 118
              text: manager.text
              font.pixelSize: 12
          }
  
      }
  
      header: Label {
          color: &quot;#15af15&quot;
          text: qsTr(&quot;Wie ist den der Umsatz Heute?&quot;)
          font.pointSize: 17
          font.bold: true
          font.family: &quot;Arial&quot;
          renderType: Text.NativeRendering
          horizontalAlignment: Text.AlignHCenter
          padding: 10
      }
  
  }
  </code></pre>
  <p><img src="https://i.stack.imgur.com/Gk002.png" alt="displayed window" /></p>