Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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";
    
    accountInformation(&dropbox);
    fileInformation(&dropbox);
    
    
    QDropboxFile *file = new QDropboxFile("/test.txt", &dropbox, this);
    
    if(!file->open(QIODevice::ReadWrite))
        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();
    
    file->close();
    
    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