import Qt 4.7 Rectangle { id: rectangle1 width: 250 height: 80 SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } color : myPalette.window; function setValue(intiger){ progressbar1.setValue(intiger); } function setText(string){ text.text=string; } function setMaximumValue(intiger){ if(intiger==0){ timerUp.running=true; setValue(-1); } else{ timerUp.running=false; progressbar1.setMax(intiger); } } signal cancelDownloading(); Text { id: text text: qsTr("Downloading dictionaries list"); anchors.right: parent.right anchors.left: parent.left font.pixelSize: 12 horizontalAlignment: Text.AlignHCenter; } ProgressBar { id: progressbar1 anchors.top: text.bottom anchors.horizontalCenter: parent.horizontalCenter value: -1 value2: 30 } Button { id: button1 height: 25; textInButton: qsTr("Cancel"); anchors.top: progressbar1.bottom anchors.right: parent.right anchors.left: parent.left onClicked: { rectangle1.cancelDownloading(); } } Timer { property bool progressMax:true; id:timerUp; interval: 50; running: false; repeat: true onTriggered:{ if(progressMax==true){ progressbar1.setValue2(0); progressMax=false; } else{ progressbar1.setValue2(100); progressMax=true; } } } }