qnetworkaccessmanager

Qt Remote File Browser

谁说胖子不能爱 提交于 2019-12-10 20:51:02
问题 I was wondering if anyone has worked on Qt Remote File Browser. From my understanding, I have two options; Use QFileDilaog with a custom proxy model when it comes to remote files. The model will be responsible for providing remote file/directory structure. Use a custom dialog and have a standard file system model for local files and a custom model for remote files. In both cases, the process of getting remote file/directory list can be accomplished using QNetworkAccess manager. Has anyone

Support for https using QNetworkAccessManager. Hitting SslErrors at runtime

那年仲夏 提交于 2019-12-10 16:59:40
问题 I am performing a https get operation with QNetworkAccessManager. I am hitting SSLErrors at runtime. After researching for a while I was able to get my program running after installing OpenSSL. I required two dlls: libeay32.dll and ssleay32.dll. Is it to say that I cannot perform https "get" operation using QNetworkAccessManager without OpenSSL ?? Doesn't Qt support native https support using QNetworkAccessManager. Thanks, De Costo. 回答1: Had to install the following dll's found at the

Reading HTTP headers

拜拜、爱过 提交于 2019-12-10 00:28:23
问题 I am trying to connect my application with a web service and here ,a user suggested to send custom headers back to my application. I am using this code void Coonnec::serviceRequestFinished(QNetworkReply *reply) { QByteArray bytes = reply->readAll(); if (reply->error() != QNetworkReply::NoError) { qDebug() << "Reply error: " + reply->errorString(); } else { qDebug() << "Uploaded: " + QDateTime::currentDateTime().toString(); qDebug() << reply->rawHeaderList(); } reply->close(); bytes.clear();

Thread count increases a lot, even when deleting the threads

对着背影说爱祢 提交于 2019-12-08 15:00:47
问题 Have an application where I have QOBJects which all contain an QNetworkAccessManager. I am aware of that it's suggested to only have on per application but since I'm making a lot more that 6 calls at the same time, I needed to have it like this. So, this is how I start the threads. FileUploader *fileUploader = new FileUploader(_fileList); QThread *fileUploaderThread = new QThread(); fileUploader->moveToThread(fileUploaderThread); // uploader > model connect(fileUploader, SIGNAL

slot error using QNetworkAccessManager

本秂侑毒 提交于 2019-12-08 10:04:38
问题 I am trying to implement a basic http connection http://developer.nokia.com/community/wiki/Creating_an_HTTP_network_request_in_Qt into Qt but I have difficultly implementing the slot. I am a Qt novice. C:\Qt5\Tools\QtCreator\bin\miniHTTP\main.cpp:10: error: request for member 'Test' in 'mTest', which is of non-class type 'coreEng()' mTest.Test(); //main.cpp #include <QCoreApplication> #include <coreeng.h> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); coreEng mTest; mTest

What is the parallelization mechanism in QNetworkAccessManager?

不问归期 提交于 2019-12-08 04:34:20
问题 I am writing an HTTP access module for VLC 2.0 using QtNetwork from Qt 4.7.4. My code snips follow: static int Open(vlc_object_t *p_this) { .... QNetworkAccessManager *nam = new QNetworkAccessManager; QNetworkReply *reply = nam->get(QNetworkRequest("http://stackoverflow.com/")); Q_ASSERT(reply); QEventLoop loop; connect(reply, SIGNAL(finished()), &loop, SLOT(quit()); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), &loop, SLOT(quit())); connect(reply, SIGNAL(readyRead()), &loop,

QNetworkAccessManager one instance and connecting slots

六月ゝ 毕业季﹏ 提交于 2019-12-08 04:18:42
问题 I have my first Qt application in development. It's a desktop client for site messaging. Qt documentation says that i need to have only one instance of QNetworkAccessManager accross application. But i also read that using of singletons with Qt isn't a good idea. How i can make one instance of QNetworkAccessManager across app? Another question is how to properly connect slots while i call ApiHandler functions from other classes? For example i have ExampleApi class which uses functions of

How can I use Qt to get html code of the redirected page?

亡梦爱人 提交于 2019-12-07 19:26:45
问题 I'm trying to use Qt to download the html code from the following url: http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=nucleotide&cmd=search&term=AB100362 this url will re-direct to www.ncbi.nlm.nih.gov/nuccore/27884304 I try to do it by following way, but I cannot get anything. it works for some webpage such as www.google.com, but not for this NCBI page. is there any way to get this page?? QNetworkReply::NetworkError downloadURL(const QUrl &url, QByteArray &data) { QNetworkAccessManager

Method to reset the QNetworkAccessManager backend

风流意气都作罢 提交于 2019-12-07 07:03:00
问题 It seems that QNetworkAccessManager does not handle missing files retrieved by ftp if the ftp server requires authentication. The situation is this: I'm downloading multiple files from the same ftp server that requires username and password. I successfully download a few files then send a GET for a file that does not exist. That request reports failure. I then send a GET request for a file that should be valid. That request never emits a finished signal or error. Qt 4.7.4 Please help! This is

Qt Jambi: Accessing the content of QNetworkReply

China☆狼群 提交于 2019-12-06 16:01:46
I'm having trouble accessing the content of QNetworkReply objects. Content appears to be empty or zero. According to the docs (translating from c++ to java) I think I've got this set up correctly, but to no avail. Additionally an "Unknown error" is being reported. Any ideas much appreciated. Code: public class Test extends QObject { private QWebPage page; public Test() { page = new QWebPage(); QNetworkAccessManager nac = new QNetworkAccessManager(); nac.finished.connect(this, "requestFinished(QNetworkReply)"); page.setNetworkAccessManager(nac); page.loadProgress.connect(this, "loadProgress(int