QT C++ - FTP Upload -
i've got problem programming easy ftp-upload in qt. using qt 5.5 , qftp class no longer available. used code working in visual c++ project.
is there way can fix problem? possible qftp working in qt 5.5?
(string filetoupload file path)
(string filename name of file on remote machine when uploaded)
thanks in advance!
your compilation error related conversion of const char*
const wchar_t*
. if satisfied ftpputfilew
can convert file name wchar_t*
. can done using qt qstring
: qstring::towchararray(wchar_t * array)
convert string wchar_t
array (this function not append null character) or using direct cast:
reinterpret_cast<const wchar_t *>(qstring.utf16())
also possible use various approaches conversion of std::string
wchar_t*
.
if need ftp put
operation qnetworkmanager
has such function. however, qnetworkmanager
has limited support low level ftp: https://stackoverflow.com/a/32568786/4023446
so, other low level ftp commands possible install manually qt ftp
.
Comments
Post a Comment