Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt Contribution
  4. Error qftp:: get
Forum Updated to NodeBB v4.3 + New Features

Error qftp:: get

Scheduled Pinned Locked Moved Qt Contribution
4 Posts 2 Posters 3.2k 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.
  • J Offline
    J Offline
    janaki
    wrote on last edited by
    #1

    i have written the code for receiving the file(image file) using qftp
    when am compiling am getting the below error
    @
    this is the code for receiving the image file using QFtp

    QFile file;
    // file = new QFile("a_30.bmp");
    QString str = "a_30.bmp";
    QFtp *ftp;
    ftp = new QFtp(this);
    int i=ftp->get("a_30.bmp",QIODevice::ReadWrite,QFtp::Binary);

    @

    error is

    no matching function for a call QFtp::get(QString *,QIODevice::openModeFlag,QFtp::TransferType)

    /usr/include/QTNetwork/qftp.h : note: candidates are int(QFtp::get(const QString &,QIODevice *, QFtp::TransferType)

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      As a second parameter you are proving a QIODevice flag and not a pointer to a QIODevice. "Checkout the QFtp documentation.":http://qt-project.org/doc/qt-4.8/qftp.html#get

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        janaki
        wrote on last edited by
        #3

        i vll definetly check the QFtp documentation and come back to u

        but i have a doubt

        after sending a file using Qftp from sender side. the receiver will get that file in the home directory

        but how the receiving side application should identify that particular .jpg file has come to its system

        actually my receiving application functionality is to receive the file(image file) and display it on the label.
        am able to receive the file sent by qftp but without hardcoding the filename in the program how should i know the filename for displaying

        please help me it is a bit urgent

        thanking u

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          In general, you should start a new thread, if you have a new question. This new thread's shall reflect a very brief summary of your issue.

          As indicated in the docs QFtp is an implementation of an FTP client. AFAIK it is working as traditional FTP clients. At least that reflects my experience. It has several "command line" commands as you know from linux and windows shells. So, if you like to get the file some place else, you need to navigate to this place and send the file. Checkout "mkdir,":http://qt-project.org/doc/qt-4.8/qftp.html#mkdir http://qt-project.org/doc/qt-4.8/qftp.html#cd and the other stuff.

          Note: QFtp is deprecated and is no longer directly available in Qt5

          Vote the answer(s) that helped you to solve your issue(s)

          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