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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
nareshkodumuri
Posts: 94
Registered: ‎04-28-2012
My Carrier: BlackBerry

How to display images in a listview using GroupDataModel in cpp?

Hi,

 

     I have downloaded all the images from the Url's and i want to display those images in a list created using GroupDataModel.

 

app.Cpp

-------------

QVariantMap eventMap;

Image img_Image(LoadImage::m_data);//where m_data is a QByteArray
				eventMap["image"]=QString(LoadImage::m_data.toBase64());
int itval=it.value();
eventMap["id"]=it.value();
								
ImageListView::dataModel->insert(eventMap);
ImageListView::list->setDataModel(ImageListView::dataModel);

 main.qml

-----------------

 

Page {
    Container {
        ListView {
            objectName: "imageListView"
            listItemComponents: [
                ListItemComponent {
                    type: "item"
                     StandardListItem {
//                         image: ListItemData.image
                         imageSource: ListItemData.image
                         title: ListItemData.id
                     }
                }
            ]
        }
       
    }
}

 Here I got the images from the url's and i am able to display the id but i am not able to display the images in the list view using groupdatamodel.

Please help me.

 

Regards,

Naresh Kodumuri.

 

Please use plain text.
Developer
raju_winit
Posts: 61
Registered: ‎05-21-2012
My Carrier: Aircel

Re: How to display images in a listview using GroupDataModel in cpp?

Hi Naresh,

 

           I am also looking for this kind of loading a list using web URLs.... please post if you got the thing...!

 

- Regards

  Raju

- Raju
Please use plain text.
Developer
nareshkodumuri
Posts: 94
Registered: ‎04-28-2012
My Carrier: BlackBerry

Re: How to display images in a listview using GroupDataModel in cpp?

Hi,

 

      Any Help!!!!!!!!!!!!!!!!!!

 

Regards,

Naresh Kodumuri.

Please use plain text.