Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
annadanesh
Posts: 82
Registered: ‎01-11-2013
My Device: DevAlphadevice
My Carrier: rim

Httpconnection Problem

Hi all,

 

I am using following code to initiate network request on click of connect button in qml file but connection is not happening so please tell me is there any mistakes in code wat am using

 

  Button {
                text:"connect"
                onClicked: {
                  HttepTest.initiateRequest();
            }

 

  void HttpTest::initiateRequest()
{
    // Start the activity indicator
    mActivityIndicator->start();

    // Create and send the network request
    QNetworkRequest request = QNetworkRequest();

    QUrl url("https://developer.blackberry.com/cascades/files/documentation/images/model.xml");
     request.setUrl(QUrl("https://developer.blackberry.com/cascades/files/documentation/images/model.xml"));


      mNetworkAccessManager->get(request);

}

Please use plain text.