QFtp能不能用

river4321 2014-02-15 10:27:20
写了个QFtp自动下载的,感觉消息比较混乱,明明下载失败收到commandFinished(int id,bool error)里面的error还是false,然后还有get了一次收到两次commandStarted()信号,google了下也没什么头绪,说是这个类有问题,QT5.0都取消了,QFtp有这么多问题么?不至于吧?是我写的有问题还是QFtp本身的问题?高手指点下,没有信心还要不要继续debug下去了。。。。
...全文
669 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
river4321 2014-12-15
  • 打赏
  • 举报
回复
哥们,我直接调wget了,功能很强大。
polly_polly 2014-02-20
  • 打赏
  • 举报
回复
期待达人释疑解惑啊,如果有需要我另外开贴加分
polly_polly 2014-02-19
  • 打赏
  • 举报
回复
引用 8 楼 foxyz 的回复:
Qftp使用相当有问题。
请问都遇到哪些问题呢? 有什么替代方法没有,我是在嵌入式linux下跑的程序
polly_polly 2014-02-19
  • 打赏
  • 举报
回复
刚发现了个问题,我上传文件到ftp服务器,文件明明上传到服务器了,但是异步返回的结果却是失败,郁闷了。。。
polly_polly 2014-02-18
  • 打赏
  • 举报
回复
#ifndef QFTPCLIENTPROCESS_H #define QFTPCLIENTPROCESS_H #include <QObject> #include <QFtp> #include <QFile> class QFtpClientProcess : public QObject { Q_OBJECT public: explicit QFtpClientProcess(QObject *parent = 0); bool putFile(QString strFileName); bool getFile(QString strFileName); bool putLogToServer(QString strFileName, QString strHomegateAddr); void SetLoginInfo(const QString &strHost, const QString &strUser, const QString &strPwd); signals: void done(bool error); public slots: private slots: void ftpDone(bool error); void ftpCommandStarted(int iId); void ftpCommandFinished(int iId, bool error); void readyRead(); private: QFtp m_ftp; QFile m_file; QString m_strHost; QString m_strUserName; QString m_strPassword; QString m_strFileName; QString m_strLogFileName; QString m_strAddr; int m_iConnectId; int m_iLoginId; int m_iMkdirId1; int m_iMkdirId2; int m_iCdId; int m_iCdId1; int m_iCdId2; int m_iPutFileId; int m_iGetFileId; int m_iCloseId; int m_iRenameId; bool m_flgPutFile; }; #endif // QFTPCLIENTPROCESS_H
polly_polly 2014-02-18
  • 打赏
  • 举报
回复
引用 4 楼 weiweiloong 的回复:
qftp的功能我是通过,带的那个例子修改的,没有发现有什么不正常的地方
你是不是通过qtftp.pro工程下的那个example修改的呀?
polly_polly 2014-02-18
  • 打赏
  • 举报
回复
那难道是自己封装的有问题么
donwmufromdying 2014-02-18
  • 打赏
  • 举报
回复
Qftp使用相当有问题。
polly_polly 2014-02-17
  • 打赏
  • 举报
回复
Qftp是不是有缺陷啊,我是在Qt4.8.1下面用的,上传文件的时候,有时候上传成功了,没有异步通知消息,还有就是跑的时间长了,ftp客户端出现假死,调用之后没有任何反馈,是不是不太稳定,Qt5才将Qftp这个类取消了呢?? 有什么好的替代办法? 我和楼主有同样的困惑,望Qt达人解惑啊
weiweiloong 2014-02-17
  • 打赏
  • 举报
回复
qftp的功能我是通过,带的那个例子修改的,没有发现有什么不正常的地方
polly_polly 2014-02-17
  • 打赏
  • 举报
回复
Qftp的批量上传功能能用么
寒山-居士 2014-02-16
  • 打赏
  • 举报
回复
Qt5.x 之后已经取消了http和ftp的,个人觉得ftp在4.x上面还行,碰到的bug不是很多,要使用qt5.x就只能使用qnetworkaccessmanager类啦

16,203

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧