[Qt-interest] Why fails this ftp->put() function?

Jonathan Finlay jmfinlayp at gmail.com
Fri Apr 9 22:38:42 CEST 2010


Hi, this ftp function fails:

 void MainWindow::putFile(){

const QVariant a =
QDir::homePath()+"/"+ui->localTreeWidget->currentItem()->text(0);

file = new QFile(ui->localTreeWidget->currentItem()->text(0));

ftp->put(file , ui->localTreeWidget->currentItem()->text(0) );

}

And This fuction work but not put file, this create a file who contains the
path of file:

 void MainWindow::putFile(){

const QVariant a =
QDir::homePath()+"/"+ui->localTreeWidget->currentItem()->text(0);

file = new QFile(ui->localTreeWidget->currentItem()->text(0));

ftp->put(a.toByteArray() , ui->localTreeWidget->currentItem()->text(0) );

}

Thanks for your help.

-- 
Jonathan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100409/76019421/attachment.html 


More information about the Qt-interest-old mailing list