5yutan5 / PyQtDarkTheme

A flat dark theme for PySide and PyQt.
https://pyqtdarktheme.readthedocs.io
MIT License
568 stars 89 forks source link

can not change the background colors of individual headerItem in TableWidget #257

Open mrhaa opened 10 months ago

mrhaa commented 10 months ago

Hello and thank you for the awesome work.

I've faced the issue; I cannot change the background colors of individual headerItem in TableWidget.

I'd like to change the background color of the first column header.

hi = QTableWidgetItem()
hi.setText("Header1")
hi.setBackground(QColor('red'))

table.setHorizontalHeaderItem(0, hi)

but nothing happens.

Is there any solution?

Thanks in advance.