QProxyStyle control for QTableWidget grid color?
-
Hi, I am using Qt 6.4.2 and my application style is based on
Fusionstyle. I am subclassingQProxyStyleto implement the required changes when having dark and light palettes as my main application palette. I have implemented changes in myQProxyStylesubclass to deal with border colors usingdrawPrimitive()function and changing the color ofQPalette::Windowto 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::Windowin mydrawPrimitive()function when the primitive element isPE_IndicatorCheckBox):
Is there any way I could control the grid color of
QTableWidgetfrom myQProxyStylesubclass? -
Hi, I am using Qt 6.4.2 and my application style is based on
Fusionstyle. I am subclassingQProxyStyleto implement the required changes when having dark and light palettes as my main application palette. I have implemented changes in myQProxyStylesubclass to deal with border colors usingdrawPrimitive()function and changing the color ofQPalette::Windowto 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::Windowin mydrawPrimitive()function when the primitive element isPE_IndicatorCheckBox):
Is there any way I could control the grid color of
QTableWidgetfrom myQProxyStylesubclass?@CJha The grid color of a QTableView is determined by QStyle::SH_Table_GridLineColor
-
C CJha has marked this topic as solved on