Hi All,
I want to add backgound of three different color to QTableWidgetItem. Is there any way to achieve this? Waiting for ur reply.
Thanks
Jnana
Hi All,
I want to add backgound of three different color to QTableWidgetItem. Is there any way to achieve this? Waiting for ur reply.
Thanks
Jnana
Use setData with Qt::BackgroundColorRole role.
Hi wysota,
Thanks for reply. But, I was not able to follow it.
setData () takes two argument, one Qt::BackgroundRole, another a QVariant object. I don't know what should be the latter object. Is it possible by adding QBrush with QGrident as second argument will change the background color to gradient type color? If I am wrong can explain what u want to convey to me.
Thanks
Jnana
The value you want to set.Originally Posted by jnana
It is possible but as far as I remember the default delegate (QItemDelegate) doesn't handle gradients, so it'll probably not work. It's safest to put some QColor (you can add a pattern too) there. Play with it.Is it possible by adding QBrush with QGrident as second argument will change the background color to gradient type color?
Bookmarks