Hello everyone. i am trying to show the content and the profile pic of that particular content as a list view in Qt. How i want is the pic should be at the left corner and the details of that pic(content) should be on the right side of that pic. Is there any wiki or direct api to do this ??? Thanks for any quick replies.


i tried the example which was in this Url

http://www.developer.nokia.com/Commu...ListWidgetItem


it works fine when i call from main function to display it in the mainwindow. but when i call it as a function from other class as below. to display it in other window where i needed it shows following error..

C:\QtSDK\Examples\sample\sample-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\sample\homescreen.cpp:54: error: 'class Homescreen' has no member named 'setCentralWidget'


This is the function



void Homescreen::contenttoactivitypage(const QString UserName, const QString Address,const QString ProfilePicture) {
/*QListWidget *listWidget = new QListWidget(this);
QListWidgetItem *newItem = new QListWidgetItem;
newItem->setText(UserName);
listWidget->insertItem(1, newItem);*/
QListWidget *listWidget = new QListWidget();
listWidget->setSortingEnabled(true);
listWidget->addItem(new QListWidgetItem(UserName));
listWidget->addItem(new QListWidgetItem(Address));
listWidget->addItem(new QListWidgetItem(ProfilePicture));
listWidget->addItem(new QListWidgetItem("Orange"));
listWidget->addItem(new QListWidgetItem("Grapes"));
listWidget->addItem(new QListWidgetItem("Jayesh"));
listWidget->addItem(new QListWidgetItem("Pineapple"));
listWidget->addItem(new QListWidgetItem("GROUNDNUT"));
listWidget->addItem(new QListWidgetItem("Sugarcane"));
listWidget->addItem(new QListWidgetItem("Coconut"));
listWidget->addItem(new QListWidgetItem("Remote"));
listWidget->addItem(new QListWidgetItem("Mango"));
QHBoxLayout *layout = new QHBoxLayout();
layout->addWidget(listWidget);
Homescreen w;
w.setStyleSheet("* { background-color:rgb(199,147,88); padding: 7px ; color:rgb(255,255,255)}");
w.setCentralWidget(listWidget);
w.showMaximized();
}



this is how i call it...

Homescreen*h=newHomescreen;
h->contenttoactivitypage(UserName,Address,ProfilePicture);

may i know wat i am going wrong?? thanks for any replies.