Jaya Meghani wrote:
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.

If you add more columns then you probably need to check the column() method of the index before calling drawGroup().

This means in QtTreeViewDelegate::paint, you should replace:

if (!index.parent().isValid()) {
  drawGroup(painter, option, index);
} else {

with:

if (!index.parent().isValid() && index.column()==0) {
  drawGroup(painter, option, index);
} else {

(disclaimer: I didn't try it)

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.

If you look at the current implementation of QtContact::paint you will notice that the QModelIndex parameter is currently ignored, meaning the code doesn't use the data provided by the model. That's why your icon gets ignored.

Aurélien

_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to