Here's the code
ContactWidget *pContactWidget = new ContactWidget();
pContactWidget->setAutoFillBackground(true);
/* Setting some data to the QLabels inside the pContactWidget */
pContactView->setItemWidget(selectedItem, 0, pContactWidget);
ContactWidget *pContactWidget = new ContactWidget();
pContactWidget->setAutoFillBackground(true);
/* Setting some data to the QLabels inside the pContactWidget */
pContactView->setItemWidget(selectedItem, 0, pContactWidget);
To copy to clipboard, switch view to plain text mode
ContactWidget - my class that inherits QFrame
pContactView - this is the QTreeWidget
Sure removing of the icon from the item before setting the widget fix the problem but this was the thing I want to avoid because when the user click on other contact from the list I must set the icon of the item again and sinse my code is not very well constructed this is ugly task to be done but if there is no other way I will remove that icon before setting the widget.
Bookmarks