QuickDownload
Easy way to download files with Qt QML and C++
Install / Use
/learn @larpon/QuickDownloadREADME
QuickDownload
Easy way to download files with Qt QML and C++
Features
- Asynchronous downloads
- Supports Qt URL schemes (http, https, ftp, custom)
- Uses QSaveFile = no corrupt or partial file downloads.
- Possible to set custom NetworkAccessManager via C++
- Self-register QML type. Plug'n'play.
Install
qpm
Setup qpm as described in the Usage for App Developers section
qpm install com.blackgrain.qml.quickdownload
Manual install
Plugin
cd /path/to/projects
git clone git@github.com:Larpon/QuickDownload.git
Open quickdownload.pro in QtCreator and build.
The result should be a *.so plugin file.
Linked
Clone from github
cd /path/to/your/qt/project/vendor/folder
git clone git@github.com:Larpon/QuickDownload.git
Include quickdownload.pri in your projects .pro file
include(<path to extensions/vendor folder>/QuickDownload/quickdownload.pri)
NOTE
quickdownload.pri auto-register the QML type Download via the Q_CORE_STARTUP_FUNCTION macro.
Usage
import QtQuick 2.0
import com.blackgrain.qml.quickdownload 1.0
Item {
Download {
id: download1
url: "http://placehold.it/350x150"
destination: "file:///tmp/test.png"
running: true
followRedirects: true
onRedirected: console.log('Redirected',url,'->',redirectUrl)
onStarted: console.log('Started download',url)
onError: console.error(errorString)
onProgressChanged: console.log(url,'progress:',progress)
onFinished: console.info(url,'done')
}
Download {
id: download2
url: "ftp://speedtest.tele2.net/5MB.zip"
destination: "file:///tmp/QuickDownload_test.zip"
overwrite: true
running: !download1.running
onStarted: console.log('Started download',url)
onError: console.error(errorString)
onProgressChanged: console.log(url,'progress:',progress)
onFinished: console.info(url,'done')
}
Download {
id: download3
url: "ftp://demo:password@test.rebex.net/readme.txt"
destination: "file:///tmp/QuickDownload_test_readme.txt"
overwrite: true
running: true
onStarted: console.log('Started download',url)
onError: console.error(errorString)
onProgressChanged: console.log(url,'progress:',progress)
onFinished: console.info(url,'done')
}
}
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
