setBackground takes column as the first argument.
If you want to set color for the whole row, u will need to call setBackground on all columns![]()
setBackground takes column as the first argument.
If you want to set color for the whole row, u will need to call setBackground on all columns![]()
Thanks for your reply.
I have only one column but n number of rows.My first row is getting the color.I want to color all the rows
Thanks
I guess you will need to iterate all items and set the color.
Other mehtod is to use delegates. I tried using it, but was not able to set the background color.
QTreeWidget uses delegates to render the items. I used QItemDelegate, but its drawBackground function was not being called. Only paint() was called. Also tried QStyledItemDelegate, but it doesnt have drawBackground function. Seems have to use paint() only..
I will let u know if i succeed. its late now... gotta sleep
Bookmarks