各位大侠帮小弟看看,为什么我的网络不通呢,qt s60 应该如何通过GPRS访问网络呢
#include "testttt.h"
#include <QTime>
#include <QHostAddress>
#include <QDebug>
#include <QTimer>
testttt::testttt(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
connect(ui.logonptn, SIGNAL(clicked()),this,SLOT(start()));
connect(ui.pushButton,SIGNAL(clicked()),this,SLOT(close()));
}
testttt::~testttt()
{
tcpClient.close();
}
void testttt::start(){
tcpClient.connectToHost(QHostAddress("232.128.7.51"), 6789);
QTimer::singleShot(1000, this, SLOT(send()));
}
void testttt::send(){
QString str1 = "$sssddd,G123,2010-04-26 13:35:23,116.6856,39.9996,23.65,342,6#";
qDebug()<<str1;
tcpClient.write(str1.toUtf8());
QTimer::singleShot(1000, this, SLOT(send()));
}