Solved QtFtp or QtNetworkAccessManager
-
Hello guys, i'm working on project to download files from a server, so which class i need ? QtFtp or QTnetworkAcessManager ? and if it is QtFtp how can i include the class to QT5 ? thanks
-
See API Changes to Qt Network https://doc.qt.io/qt-5/sourcebreaks.html
*The QFtp and QUrlInfo classes are no longer exported. Use QNetworkAccessManager instead. Programs that require raw FTP or HTTP streams can use the Qt FTP and Qt HTTP compatibility add-on modules that provide the QFtp and QHttp classes as they existed in Qt 4.
*Personally I recommend for new implementations using QNetworkAccessManager directly. The source code referenced in the doc snippet is more compatibility IMHO.
-
@koahnig i will test it but can you tell me how to add Qt Ftp module ?
-
Checkout the original text in link given
@koahnig said in QtFtp or QtAccessManagerNetwork:See API Changes to Qt Network https://doc.qt.io/qt-5/sourcebreaks.html
This shall point to the source code. I had done way back with Qt 5.5 or so. With the source code you download also the guidelines AFAIR.
-
@koahnig and where to add it ? in the path directory ?
-
You can keep it seperately as your library. There you would use in .pro INCLUDEPATH += and add the lib manually. I kept it seperately for my tests.
I believe within the instructions you shall find also how to integrate with your Qt installations.
Practically I got rid of QtFtp as fast as possible.
-
i trieed this one but always same error, in the header file (screen 2 ) i have to include all the path ? thanks
-
Use '/' instead of '\' in typing path values in .pro. That makes life easier. '\' would be start of a continuation line in .pro files.
IMHO use linux notation on windows as well. -
Hey guys, i made the program to download file using QNetworkAccessManager, is it possible to download folder that contains file ? Thanks