QFtp under Qt 5
-
Hi,
I want to use the Qftp class under Qt 5, because I want to get the list of files from a directory on a FTP-Server. Could anyone tell me how I can add the Qftp class in Qt 5.10.0? I'm using the Qt Creator 4.5.0 under Windows 10. I have read already some instructions here in the forum, but it doesn't work.
I hope someone can help me.
Thanks in advance.
-
-
@aha_1980 said in QFtp under Qt 5:
Hi @magguz,
I have read already some instructions here in the forum, but it doesn't work.
At which point exactly do you encounter problems? Please provide more (and exact) information so we can help you.
Thanks.
Hi,
I followed these steps: https://forum.qt.io/topic/64412/how-to-add-qftp-in-qt5
The first step I have done. But the other steps are not detailed enouqh. For example which qmake is meant? There are more than one qmake.exe in the qt-Folder.
-
@magguz said in QFtp under Qt 5:
There are more than one qmake.exe in the qt-Folder.
Then choose the one from the Qt version you want to use the QFtp class afterwards.
-
@aha_1980 said in QFtp under Qt 5:
@magguz said in QFtp under Qt 5:
There are more than one qmake.exe in the qt-Folder.
Then choose the one from the Qt version you want to use the QFtp class afterwards.
I have chosen the following qmake-file: c:\Qt\Qt5.10.0\5.10.0\winrt_x64_msvc2017\bin\qmake
But I get this error: "Project ERROR: Cannot run target compiler 'cl'. Maybe you forgot to setup the environment?"
-
@magguz said in QFtp under Qt 5:
I have chosen the following qmake-file: c:\Qt\Qt5.10.0\5.10.0\winrt_x64_msvc2017\bin\qmake
But I get this error: "Project ERROR: Cannot run target compiler 'cl'. Maybe you forgot to setup the environment?"
You get this error at the command prompt? To setup the environment for MSVC you have to open a "Visual Studio Command Prompt" (not sure how it is called exactly) from the Start Menu. Note that this compile has to match the Qt version.
I'm also not sure if WinRT is the best choice...
-
@aha_1980 said in QFtp under Qt 5:
@magguz said in QFtp under Qt 5:
I have chosen the following qmake-file: c:\Qt\Qt5.10.0\5.10.0\winrt_x64_msvc2017\bin\qmake
But I get this error: "Project ERROR: Cannot run target compiler 'cl'. Maybe you forgot to setup the environment?"
You get this error at the command prompt? To setup the environment for MSVC you have to open a "Visual Studio Command Prompt" (not sure how it is called exactly) from the Start Menu. Note that this compile has to match the Qt version.
I'm also not sure if WinRT is the best choice...
Yes, I get this error at the command prompt. Which qmake do you recommend to choose?
-
@magguz said in QFtp under Qt 5:
Yes, I get this error at the command prompt. Which qmake do you recommend to choose?
At this point it would be interesting to know which Compilers (version and bitness) you have and which Qt-Versions (version, compiler and bitness).
At the end, your choice depends on the target platform your application will run on.
-
@aha_1980 said in QFtp under Qt 5:
@magguz said in QFtp under Qt 5:
Yes, I get this error at the command prompt. Which qmake do you recommend to choose?
At this point it would be interesting to know which Compilers (version and bitness) you have and which Qt-Versions (version, compiler and bitness).
At the end, your choice depends on the target platform your application will run on.
Qt-Version is 5.10.0, Compiler is MinGW 5.3.0
I want to run the application on Windows 10 / 64 bit -
mine is
"C:\Qt\5.9.2\msvc2015_64\bin\qmake.exe" -
@mrjj said in QFtp under Qt 5:
@magguz
ok did you install Qt for Desktop app also?Yes.
you should use qmake from that folder. not winrt
I have installed Qt under C:\Qt\
In the directory c:\Qt\Qt5.10.0\5.10.0\ there are different folders which contain a qmake-file. Can you tell me which is the right one?
-
@mrjj said in QFtp under Qt 5:
@magguz
it looks right yes.
And make sure you run in a visual command prompt so it can find its nmake.exe etc.I used the "Developer Command Prompt for VS 2017" and I run the qmake in the folder "msvc2017_64". Now it created a stash-file. Is that correct?