for (int i = 0; i < 20; i++) {
item
->setSizeHint
(QSize(200,
75));
NameEntry
* ne
= new NameEntry
("John",
"NU",
QPixmap(":/fb/images/1604859.jpg"),
"123456789" );
//connect(ui.listWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(changeDate()));
ui.listWidget->setItemWidget(item, ne);
connect(ui.
listWidget,
SIGNAL(itemClicked
(QListWidgetItem *)),
this,
SLOT(changeDate
()));
}
//... snip
void changeDate()
{
ui.lblDate->setText("Working...");
}
for (int i = 0; i < 20; i++) {
QListWidgetItem * item = new QListWidgetItem("123456789", ui.listWidget);
item->setSizeHint(QSize(200,75));
NameEntry * ne = new NameEntry("John", "NU", QPixmap(":/fb/images/1604859.jpg"), "123456789" );
//connect(ui.listWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(changeDate()));
ui.listWidget->setItemWidget(item, ne);
connect(ui.listWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(changeDate()));
}
//... snip
void changeDate()
{
ui.lblDate->setText("Working...");
}
To copy to clipboard, switch view to plain text mode
Bookmarks