Since the encounter FTP transfer file This task, I started to find can use QTFTP to achieve, but the online download compiled good library can not be used, back and forth for a long time, finally gave up, turn to cast curl, but the funny thing is this afternoon know how to do. Hey ~ ~ ~ ~ ~
1. Download Qtftp Source code
Note that I am talking about the source code, if you find a compiled library on the Internet, often can not use, and if you also use MinGW to compile, or honestly download the source code bar. The internet is not easy to find, I shared a, address is (http://download.csdn.net/detail/xueyushenzhou/9580401), points for 8, a bit expensive ah, but really good things.
Unzip the file after downloading.
Compilation environment: Win7 (64bit) +qt5.5.1+mingw492_32+qtftp 5.0.0
2. Move the Qt-qtftp folder to the C:\QT\QT5.5.1\5.5\SRC directory and rename it to Qtqtftp.
3, modify the C:\Qt\Qt5.5.1\5.5\Src\qtqtftp\src\qftp\qftp.pro file config-= shared as Config + = shared, without modification, you can only generate a static library.
4, open Qt command line, CD into the C:\Qt\Qt5.5.1\5.5\Src\qtftp directory, start compiling: Mingw32-make Makefile;
5. Copy the *.dll dynamic library files (Qt5Ftp.dll, Qt5Ftpd.dll) generated under the C:\Qt\Qt5.5.1\5.5\Src\qtftp\lib directory to C:\Qt\Qt5.5.1\5.5\mingw492_32\ Bin directory.
6. Copy the *.a and *.pri files generated under the C:\Qt\Qt5.5.1\5.5\\Src\qtftp\lib directory to the C:\Qt\Qt5.5.1\5.5\\mingw48_32\lib directory.
7. Copy the Qftp.h and qurlinfo.h in the C:\Qt\Qt5.5.1\5.5\\Src\qtftp\src\qftp directory to C:\Qt\Qt5.5.1\5.5\mingw492_32include\ The Qtnetwork directory.
8, in the C:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtNetwork directory to create a new qftp file without a suffix, the content of #include "qftp.h."
OK, so that completes the QTFTP compilation.
The final step, test the effect, the example is C:\Qt\Qt5.5.1\5.5\\Src\qtftp\examples.
After starting, according to your configured FTP settings, detailed method please see a blog.
Select the file under the server, and then click Download to save the file to the program root directory.
Ok.