• 7977阅读
  • 0回复

QObject::startTimer: QTimer can only be used with threads started with QThread [复制链接]

上一主题 下一主题
离线thatguy
 

只看楼主 倒序阅读 楼主  发表于: 2010-04-13
我想在QT中使用qftp库,
以下代码运行,显示出dos窗口提示“QObject::startTimer: QTimer can only be used with threads started with QThread”
是什么原因?谢谢。


  1. #include <Qt/QFtp.h>
  2. #include <qfile.h>
  3. #include <QCoreApplication>
  4. #ifdef DEBUG
  5. #include <iostream>
  6. using namespace std;
  7. #endif
  8. int main(int argc, char *argv[])
  9. {
  10.     QFtp *ftp = new QFtp();
  11.     ftp->connectToHost("....");
  12.     ftp->login();
  13.   EXIT:
  14.     ftp->close();
  15.      return 0;
  16. }
快速回复
限100 字节
 
上一个 下一个