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. QIODevice::read (QTcpSocket, "QFtpDTP Passive state socket"): device not open

QIODevice::read (QTcpSocket, "QFtpDTP Passive state socket"): device not open

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.8k Views
  • 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.
  • C Offline
    C Offline
    changtj
    wrote on last edited by changtj
    #1

    download
    https://code.qt.io/cgit/qt/qtftp.git/

        file = Q_NULLPTR;
        QString  localFileName = this->localDir + fileName;
    //![3]
    //
        if ( !QFile::exists(localFileName)) {
            emit state( tr("There is not a file called %1 in "
                           "the current directory.")
                        .arg(localFileName));
            emit putOk();
            return;
        }
    
    //![4]
        file = new QFile(localFileName);
        if (!file->open(QIODevice::ReadOnly)) {
            emit state( tr("Unable to read the file %1: %2.")
                        .arg(localFileName).arg(file->errorString()));
            delete file;
            emit putOk();
            return;
        }
        QString remoteFile;
        remoteFile = fileName;
        ftp->put(file, remoteFile);
    

    i find that the file is successly uploaded .

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Is there any actual question or problem here?

      (Z(:^

      C 1 Reply Last reply
      4
      • sierdzioS sierdzio

        Is there any actual question or problem here?

        C Offline
        C Offline
        changtj
        wrote on last edited by
        #3

        @sierdzio

        i find not.

        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