Ismael
Ismael

Reputation: 37

error in #include <QFtp> what should i do

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".

Upvotes: 3

Views: 3868

Answers (2)

L&#225;szl&#243; Papp
L&#225;szl&#243; Papp

Reputation: 53185

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

Upvotes: 3

fbucek
fbucek

Reputation: 1667

You should add something like this, to your project file.

QT += network

QFtp is part of Network module

Upvotes: 4

Related Questions