how to change text color in QTableView?
How do I change the color of the text within the QTableView using qt stylesheet?
I have used following entry into my qss:
QTableView
{
font-color : white;
color : white;
background-color: black;
gridline-color: white;
}
but since the default text color is black, so nothing is visible. I want the text displayed within the QTableView to be displayed in white color. The above structure is not working.
Please help.
Re: how to change text color in QTableView?
I have no idea how to set the text color with stylesheets. But I use Qt::ItemDataRole (Qt::ForegroundRole) with setdata().
Re: how to change text color in QTableView?
Quote:
Originally Posted by
janus
I have no idea how to set the text color with stylesheets. But I use
Qt::ItemDataRole (Qt::ForegroundRole) with setdata().
But how to add in qss file? i tried like below, but its not working.:(
QTableView
{
font-color : white;
color : white;
background-color: black;
Foreground-color : white;
}