好吧 最后自己用QTcpSocket解决了
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
tcpSocket = new QTcpSocket(this);
tcpSocket->connectToHost("192.168.1.1",8080);
connect(tcpSocket,SIGNAL(readyRead()),this,SLOT(tcpDataReceive()));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::tcpDataReceive()
{
QByteArray data = QByteArray::fromHex(tcpSocket->readAll());
qDebug() << data;
}
void MainWindow::on_pushButton_clicked()
{
tcpSocket->write("GET /?action=stream\r\n\r\n");
}