QProxyStyle control for QTableWidget grid color?
-
Hi, I am using Qt 6.4.2 and my application style is based on
Fusion
style. I am subclassingQProxyStyle
to implement the required changes when having dark and light palettes as my main application palette. I have implemented changes in myQProxyStyle
subclass to deal with border colors usingdrawPrimitive()
function and changing the color ofQPalette::Window
to my desired border color when the primitive element is eitherPE_IndicatorCheckBox
,PE_IndicatorRadioButton
,PE_Frame
, etc. This produces the desired result of changing the border color and hence a separation between the widget area and background when the background color is very dark (close toQColor{0, 0, 0}
).However, when my background is very dark my table widget looks like this (the border around the Enabled checkbox is there because I have reassigned the color for
QPalette::Window
in mydrawPrimitive()
function when the primitive element isPE_IndicatorCheckBox
):Is there any way I could control the grid color of
QTableWidget
from myQProxyStyle
subclass? -
@CJha The grid color of a QTableView is determined by QStyle::SH_Table_GridLineColor
-