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".
error in #include <QFtp> what should i do
3.7k Views Asked by Ismael At
2
There are 2 best solutions below
8
On
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
You should add something like this, to your project file.
QFtp is part of Network module