Advertisement
Guest User

Untitled

a guest
Jun 7th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.83 KB | None | 0 0
  1. import VPlay 2.0
  2. import VPlayApps 1.0
  3. import QtQuick 2.0
  4.  
  5. App {
  6.   DownloadableResource {
  7.     id: dl
  8.     source: "https://www.dropbox.com/s/z2dxyn2847stnq3/multiResolutionImage.zip?dl=1"
  9.     storageName: "multiResolutionImage"
  10.  
  11.     onStatusChanged: if(status === DownloadableResource.Available) console.log("Resource now available at path:", storagePath)
  12.   }
  13.  
  14.   Column {
  15.     anchors.fill: parent
  16.     spacing: dp(12)
  17.  
  18.     AppButton {
  19.       text: "Download"
  20.       onClicked: dl.download()
  21.       enabled: !dl.available && !dl.busy
  22.     }
  23.  
  24.     AppButton {
  25.       text: "Open extracted file"
  26.       onClicked: nativeUtils.openUrl(dl.getExtractedFileUrl("+hd/testContentScaling.png"))
  27.       enabled: dl.available
  28.     }
  29.  
  30.     AppButton {
  31.       text: "Remove"
  32.       onClicked: dl.remove()
  33.       enabled: dl.available
  34.     }
  35.   }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement