Created
June 29, 2018 08:08
-
-
Save tanmoyAtb/f220debff63c5e741c3a7c54a5c784a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MAINWINDOW_H | |
#define MAINWINDOW_H | |
#include <QMainWindow> | |
#include <QNetworkAccessManager> | |
#include <QDebug> | |
#include <QUrl> | |
#include <QNetworkRequest> | |
#include <QNetworkReply> | |
namespace Ui { | |
class MainWindow; | |
} | |
class MainWindow : public QMainWindow | |
{ | |
Q_OBJECT | |
public: | |
explicit MainWindow(QWidget *parent = 0); | |
~MainWindow(); | |
private: | |
Ui::MainWindow *ui; | |
QNetworkAccessManager *manager; | |
private slots: | |
void replyFinished(QNetworkReply*); | |
void on_actionSettings_triggered(); | |
}; | |
#endif // MAINWINDOW_H | |
#include "mainwindow.h" | |
#include "ui_mainwindow.h" | |
MainWindow::MainWindow(QWidget *parent) : | |
QMainWindow(parent), | |
ui(new Ui::MainWindow) | |
{ | |
ui->setupUi(this); | |
manager = new QNetworkAccessManager(this); | |
connect(manager, SIGNAL(finished(QNetworkReply*)), | |
this, SLOT(replyFinished(QNetworkReply*))); | |
manager->get(QNetworkRequest(QUrl("http://www.sigmindai.net/itms/indianitms.php?passkey=secretitms"))); | |
} | |
MainWindow::~MainWindow() | |
{ | |
delete ui; | |
} | |
void MainWindow::replyFinished(QNetworkReply *rep){ | |
if(rep->readAll() == "ok") qDebug() << "valid"; | |
} | |
void MainWindow::on_actionSettings_triggered() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment