I want to use ftp from my Qt project. But when I add #include <QFtp>
in the program and run the compiler says: "error: QFtp: No such file or directory".
You should add something like this, to your project file.
QT += network
QFtp is part of Network module
You will need to use the qmake statement below in your qmake project file (.pro or .pri) with Qt 5 as it was moved to a separate playground module due to its design limitations. However, I have used it successfully in my previous commercial project, so it should be fine:
QT += ftp
Otherwise, if you are still using Qt 4, you just need to include the network
module into the QT
variables as seen below:
QT += network
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.