title: How to repaint Qt window or tabview in window
body: <p>I want to click a button, then popup a dialog box. The Dialog is from Qml, has a label which is made of a variable number from another JavaScript file. When the variable changes, the dialog should repaint, the new number will display on the dialog box. </p>
  
  <p>MyDlg.qml:</p>
  
  <pre><code>import "MyJs.js" as MyJs
  
  Window {
  
      id: myDialog
      width: 300
      height: 300
  
      TabView {
          id:myTabView
          width: parent.width
          height: parent.height
  
          Tab {
              title: "tab 1"
              id: myTab1
              text: MyJs.displayText
              }
       }
  }
  </code></pre>
  
  <p>MyJs.js:</p>
  
  <pre><code>var displayText = "0";
  </code></pre>