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
nareshkodumuri
Posts: 125
Registered: ‎04-28-2012
My Device: BlackBerry 9800

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.

 

Developer
raju504
Posts: 86
Registered: ‎05-21-2012
My Device: Blackberry 10 Dev Alpha

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
Developer
nareshkodumuri
Posts: 125
Registered: ‎04-28-2012
My Device: BlackBerry 9800

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

Hi,

 

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

 

Regards,

Naresh Kodumuri.