-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.1, 6.7.2
-
None
trying to change the textcolor of a QTableWidgetItem with setForeground(QColor(x,x,x)) doesn't seem to work.
if i run this simple script:
from PySide6.QtWidgets import QApplication, QTableWidget, QTableWidgetItem from PySide6.QtGui import QColor app = QApplication([]) # Create a QTableWidget with 1 row and 1 column table_widget = QTableWidget(1, 1) # Create a QTableWidgetItem item = QTableWidgetItem("Hello, World!") # Change the text color to red item.setForeground(QColor(255, 0, 0)) # Add the item to the table table_widget.setItem(0, 0, item) # Show the table widget table_widget.show() # Run the application app.exec_()
i get the following window:
The "Hello, World!" text should be red.
It worked with version 6.6.3.1
It also works on Linux (Kubuntu 22.04.3 LTS)