Connect Qt app to Internet (Symbian)
I try to connect to Internet from a Symbian phone (S60v3 FP1) but..not very successfully. When I try the app within the Qt Simulator it works - connects, downloads, etc. Maybe the FP version of the phone is connected with the problem - I've read somewhere that since FP2 there are some changes.
I have tried to use QNetworkConfigurationManager
and QNetworkSession
but again without success. All I want is to see the list with access points on my phone screen (to choose one and the app to run flawlessly) :)
I have included:
#include <QtNetwork>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
I have written the slot:
void someApp::replyFinished(QNetworkReply * pReply)
{
...nonsense...
}
And from the examples I have read this is needed:
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replyFinished(QNetworkReply*)));
manager->get(QNetworkRequest(QUrl("http://stackoverflow.com/")));
I added (to the .pro file):
QT += network
Not sure if it is necessary but th开发者_JAVA百科is is also in the app:
MOBILITY = bearer
What else I need?
I have been using Qt for several days and many things are still unknown to me (..as it is obvious from the whole question).
Thanks for reading (and hopefully helping) :)
You need to add the NetworkServices capability in the symbian settings in .pro file:
symbian: {
...
TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
...
}
This declares that the resulting sis file will want to use networkservices capabilities. I suggest you read up on the symbian capabilities system from forum nokia, as these kinds of problems are quite common.
精彩评论