Hi,
I'm new in QT development and I'm trying do write a simple application to connect to a network.
Here's the code:
Code:
#include <QApplication>
#ifdef Q_OS_SYMBIAN
#include <QDir>
#include <QDesktopWidget> 
#include <QtNetwork>
#include <QHttp>
#include <QUrl>
#include <QFile>
#endif

QT_BEGIN_NAMESPACE
class QUrl;
class QHttpRequestHeader;
class QHttp;
class QUrlInfo;
QT_END_NAMESPACE

#if defined Q_OS_SYMBIAN && defined SETDEFAULTIF_AVAILABLE
#include <es_sock.h>
#include <sys/socket.h>
#include <net/if.h>

static void setDefaultIapL()
{
    TInt err = KErrNone;
    RSocketServ serv;
    CleanupClosePushL(serv);
    User::LeaveIfError(serv.Connect());

    RConnection conn;   
    CleanupClosePushL(conn);     
    User::LeaveIfError(conn.Open(serv));    
    User::LeaveIfError(conn.Start());
     
    _LIT(KIapNameSetting, "IAP\\Name");
    TBuf8<50> iapName;
    User::LeaveIfError(conn.GetDesSetting(TPtrC(KIapNameSetting), iapName));   
    
    struct ifreq ifReq; 
    strcpy( ifReq.ifr_name, (char*)iapName.Ptr()); 
    User::LeaveIfError(setdefaultif( &ifReq ));
    
    CleanupStack::PopAndDestroy(&conn);
    CleanupStack::PopAndDestroy(&serv);
}

static int setDefaultIap()
{
    TRAPD(err, setDefaultIapL());
    return err;
}

#endif


int main(int argc, char *argv[])
{
#ifdef Q_OS_SYMBIAN
#ifdef SETDEFAULTIF_AVAILABLE
    setDefaultIap();
#endif    

#endif
	QApplication a(argc, argv);
    QFile file("index.php");
    QHttp http("www.google.it"); //*
    http.get("/index.php", &file);
	a.connect(&http, SIGNAL(done(bool)), &a, SLOT(quit()));
	return a.exec();

}
But I've got the following error:
'QHttp http' has initializer but incomplete type
Someone can help me?