Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qftp FtpWindow Example Issue: No Progress On Download
Qt 6.11 is out! See what's new in the release blog

Qftp FtpWindow Example Issue: No Progress On Download

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 849 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IanInOttawa
    wrote on last edited by
    #1

    I have a weird issue: If I use the sample program as is it works fine, I can view the files on my ftp server and download selected files, no problem. HOWEVER, the project I'm working on only needs one file to be downloaded, it's always in the same spot, always present etc. So I'd like the modified version to simply get the file as soon as the user presses the Connect button. Behind the scenes inside FtpWindow::ftpCommandFinished() in the section for QFtp::List I have:

    @
    if (ftp->currentCommand() == QFtp::List) {
    if (isDirectory.isEmpty()) {
    fileList->addTopLevelItem(new QTreeWidgetItem(QStringList() << tr("<empty>")));
    fileList->setEnabled(false);
    }
    // what xml config files did we encounter?
    for( int i = 0; i < fileList->topLevelItemCount(); i++ ){
    QTreeWidgetItem *it = fileList->topLevelItem(i);
    if( it->text(0).indexOf("myfile") != -1 ) {
    fileList->setCurrentItem(it);
    downloadButton->setEnabled(true);
    downloadFile(); <===> // downloadFile() ! ! ! !
    break;
    }
    }

        return;
    }
    

    @

    Long story short: if I try to automate the selection of the file, the progress bar appears but never gets updated (never gets the dataTransferProgress signal). In the above code, if I comment out the downloadFile() and selected it manually with my mouse click then all's well. Arrrg! I've verified that the file provided in the ftp->get() is in fact non-zero and valid. Spent way too long on this already. If anyone has any suggestions I'd be very appreciative ;-)

    Thanks,
    Ian

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved