我想在QT中使用qftp库,
以下代码运行,显示出dos窗口提示“QObject::startTimer: QTimer can only be used with threads started with QThread”
是什么原因?谢谢。
- #include <Qt/QFtp.h>
- #include <qfile.h>
- #include <QCoreApplication>
- #ifdef DEBUG
- #include <iostream>
- using namespace std;
- #endif
- int main(int argc, char *argv[])
- {
-     QFtp *ftp = new QFtp();
-     ftp->connectToHost("....");
-     ftp->login();
-   EXIT:
-     ftp->close();
-      return 0;
- }