Hi Guys,
I have been trying to use QObject::connect , but the signal is not being sent.
[code]
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
QNetworkReply* reply = manager->get(QNetworkRequest(url));
QObject::connect(reply,SIGNAL(finished(QNetworkRep ly*)),this,SLOT(replyFinish(QNetworkReply*)));
[\code]
[code]
void USGSDialog::replyFinish(QNetworkReply* reply)
{
if(reply->isOpen()){
QXmlInputSource input;
input.setData(reply->readAll());
QDomDocument doc;
doc.setContent(input.data());
// Get the root element
QDomElement root = doc.firstChildElement();
// Get Data
getData(root);
if(reply->isFinished())
reply->close();
}
[\code]
My class file looks like this
[code]
class USGSDialog : public QDialog
{
Q_OBJECT
public:
explicit USGSDialog(QWidget *parent = 0);
~USGSDialog();
signals:
public slots:
void replyFinish(QNetworkReply* reply);
[\code]
Can anybody help me out why the control doesn't go into the slot ? Why is the signal not being emitted ?
Thanks in Advance
Bookmarks