Hi,
I basically want to add a button in Tree Widget of Contact List.
However when I add columns in ContactList.ui, Group open and down arrow
pixmaps start showing up for all columns.
As per my understanding, its because QTreeViewDelegate controls paint
event.
void QtTreeViewDelegate::paint(QPainter * painter, const
QStyleOptionViewItem & option, const QModelIndex & index) const {
if (!index.parent().isValid()) {
drawGroup(painter, option, index);
} else {
QtContactListManager * ul = QtContactListManager::getInstance();
ul->paintContact(painter, option, index);
}
}
So my question is How can i add columns and add Pusbutton to it? If I
add to QtContactManager.cpp in void QtContactManager::redrawContacts()
function nothing shows on window after running exe.
QTreeWidgetItem * newContact = NULL;
QtContact * qtContact = NULL;
QString contactName;
newContact = new QTreeWidgetItem(group);
newContact->setText(0, QString::fromStdString((*it)));
newContact->setIcon(1,QIcon(":pics/vonage/icon_man.png"));
Thanks.
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel