Skip to content
  • 0 Votes
    5 Posts
    394 Views
    P

    Thanks everyone

  • 0 Votes
    5 Posts
    871 Views
    KroMignonK

    @Vincent66 Bonjour, QTfp ne fait plus parti du project Qt mais les sources restes accessibles sur GitHub ==> https://github.com/qt/qtftp

    Pourquoi ne pas simplement partir de là et faire les adaptations eventuellement nécessaire pour la compilation?

  • 0 Votes
    13 Posts
    11k Views
    VRoninV
    #include <QCoreApplication> #include <QNetworkAccessManager> #include <QNetworkReply> #include <QNetworkRequest> int main(int argc, char *argv[]) { QCoreApplication a(argc,argv); QNetworkAccessManager netMan; QNetworkReply* const repl = netMan.get(QNetworkRequest(QUrl::fromUserInput(R"**(ftp://131.225.104.13/linux/.snapshot/NDMP_AUTO_SNAPSHOT3210/fermi/contrib/obsolete/video/nvidia/5328/NVIDIA.5328.README.txt)**"))); QObject::connect(repl,&QNetworkReply::readyRead,[repl]()->void{ qDebug().noquote() << repl->readAll(); }); QObject::connect(repl,QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error),[repl]()->void{ qDebug() << "Error: " + repl->errorString(); }); QObject::connect(repl,&QNetworkReply::finished,repl,&QNetworkReply::deleteLater); QObject::connect(&netMan,&QNetworkAccessManager::authenticationRequired,repl,[repl](QNetworkReply *reply, QAuthenticator *authenticator)->void{ if(reply!=repl) return; aAuthenticator->setUser("MyUserName"); aAuthenticator->setPassword("MyPassword"); }); return a.exec(); }
  • 0 Votes
    1 Posts
    1k Views
    No one has replied