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.
MyDlg.qml:
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
}
}
}
MyJs.js:
var displayText = "0";