当前位置: 技术问答>linux和unix
一段C++写的上传和下载的代码
来源: 互联网 发布时间:2016-03-31
本文导语: 请高手帮忙写下注释!!最好详细一些!!! 再请帮写个makefile文件!!!谢谢!!! ////////main.cpp #include #include "downloader.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QUrl url("ftp://localhost/"); if (arg...
请高手帮忙写下注释!!最好详细一些!!!
再请帮写个makefile文件!!!谢谢!!!
////////main.cpp
#include
#include "downloader.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QUrl url("ftp://localhost/");
if (argc >= 2)
url = argv[1];
Downloader downloader(url);
QObject::connect(&downloader, SIGNAL(finished()),
&app, SLOT(quit()));
return app.exec();
}
////////downloader.pro
CONFIG += exceptions
HEADERS = downloader.h
SOURCES = downloader.cpp
main.cpp
再请帮写个makefile文件!!!谢谢!!!
////////main.cpp
#include
#include "downloader.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QUrl url("ftp://localhost/");
if (argc >= 2)
url = argv[1];
Downloader downloader(url);
QObject::connect(&downloader, SIGNAL(finished()),
&app, SLOT(quit()));
return app.exec();
}
////////downloader.pro
CONFIG += exceptions
HEADERS = downloader.h
SOURCES = downloader.cpp
main.cpp
|
这个是qt的代码,楼主是否知道呢...?