Nominate our 2022 Qt Champions!

QtDropbox - download file

  • Hi, I have a problem with Qt Dropbox, but they do not know how to download the file. The connection of Dropbox application is successful. Namely I create a variable QDropboxFile, to which convey 3 arguments (file name, instance QDropbox, and this). Then I wanted to check the file size, but still shows 0 bytes.

    Documentations QtDropbox

    The following code, which makes the problem :

    void speccy_win::dropboxCase1(){
    QDropbox dropbox(APP_KEY, APP_SECRET); connectDropbox(&dropbox, QDropbox::Plaintext);
    QDropboxAccount accInf = dropbox.requestAccountInfoAndWait();
    qDebug() << "Account : " << accInf.displayName();
    if(dropbox.error() == QDropbox::NoError)
        qDebug() << "Brak błędów";
    QDropboxFile *file = new QDropboxFile("/test.txt", &dropbox, this);
        qCritical() << "QDropboxFile open failed !!! : " << file->errorString();
    QDropboxAccount testAccount = file->api()->requestAccountInfoAndWait();
    qDebug() << "testAccount : " << testAccount.displayName();
    qDebug() << "filename() : " << file->filename();
    QDropboxFileInfo *fileInfo = new QDropboxFileInfo(file->metadata());
    qDebug() << fileInfo->bytes();
    return; }

  • Hi,

    QtDropBox is an independent project and is not part of the official Qt packages.
    I suggest to contact the project maintainer (via GitHub or direct mail)

Log in to reply