Forum
Sign Up
× DataGrid for Qt.C++

Change color of cell based on value in column

7 years 4 months ago - 7 years 4 months ago #1 by Padmavathi
Hello,

I'm currently using the banded table view in my qtitangrid.
I am trying to modify the background color of the cell in a specific column based on the value in the column.
I tried setDecorationColor(which is applied per column) and setCellPalette(which seems to be applicable to all cells), but I am not able to set the background of a specific cell based on its value. I was curious if I could change the text color instead as an alternative.
-EDIT: This has been cleared, I'm now able to achieve this. Thank you for your help. I'm now more curious about the following?:


Additionally, is there a dirty row event I can use to bold out the concerned row if dirty?

Thanks in advance!
Padma
Last edit: 7 years 4 months ago by Padmavathi. Reason: update

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.152 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )